all patches since Sept. 2008
ivtools patch distribution <[email protected]> Fri, 6 Nov 2009 11:46:28 -0800
| Newsgroups | gmane.comp.lib.ivtools.patches |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail-40-56714919 Content-Disposition: attachment; filename=ivtools-091106-johnston-031 Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-091106-johnston-031" Content-Transfer-Encoding: 7bit Patch: ivtools-091106-johnston-031 For: ivtools-1.2 Author: [email protected] Subject: incorporate Ubuntu Linux 9.04 required changes Requires: This is an intermediate patch to ivtools-1.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: Index: ComTerp/comhandler.c diff -c ComTerp/comhandler.c:1.6 ComTerp/comhandler.c:1.7 *** ComTerp/comhandler.c:1.6 Fri Feb 27 07:00:04 2009 --- src/ComTerp/comhandler.c Fri Nov 6 11:34:43 2009 *************** *** 28,34 **** #include <fstream.h> #if __GNUC__==2 && __GNUC_MINOR__<=7 #else ! #include <vector.h> #endif #include <ComTerp/comhandler.h> --- 28,35 ---- #include <fstream.h> #if __GNUC__==2 && __GNUC_MINOR__<=7 #else ! using namespace std; ! #include <vector> #endif #include <ComTerp/comhandler.h> Index: DrawServ/ackback-handler.c diff -c DrawServ/ackback-handler.c:1.1 DrawServ/ackback-handler.c:1.2 *** DrawServ/ackback-handler.c:1.1 Wed Aug 29 10:39:00 2007 --- src/DrawServ/ackback-handler.c Fri Nov 6 11:34:50 2009 *************** *** 23,29 **** #ifdef HAVE_ACE ! #include <vector.h> #include <err.h> #include <DrawServ/ackback-handler.h> --- 23,30 ---- #ifdef HAVE_ACE ! using namespace std; ! #include <vector> #include <err.h> #include <DrawServ/ackback-handler.h> *************** *** 35,40 **** --- 36,43 ---- #include <IVGlyph/gdialogs.h> #include <InterViews/window.h> + #include <iostream.h> + /*****************************************************************************/ // Default constructor. Index: DrawServ/rcdialog.c diff -c DrawServ/rcdialog.c:1.1 DrawServ/rcdialog.c:1.2 *** DrawServ/rcdialog.c:1.1 Wed Aug 29 10:39:00 2007 --- src/DrawServ/rcdialog.c Fri Nov 6 11:34:50 2009 *************** *** 51,57 **** #include <stdio.h> #include <stdlib.h> ! #include <vector.h> /*****************************************************************************/ --- 51,58 ---- #include <stdio.h> #include <stdlib.h> ! using namespace std; ! #include <vector> /*****************************************************************************/ Index: include_std/stdio.h diff -c include_std/stdio.h:1.1 include_std/stdio.h:1.2 *** include_std/stdio.h:1.1 Wed Aug 29 10:39:19 2007 --- src/include/ivstd/stdio.h Fri Nov 6 11:34:52 2009 *************** *** 17,20 **** --- 17,22 ---- #endif #endif + #else + #include_next <stdio.h> #endif *** /dev/null Fri Nov 6 11:34:54 PST 2009 --- patches/ivtools-091106-johnston-031 *************** patches/ivtools-091106-johnston-031 *** 0 **** --- 1 ---- + ivtools-091106-johnston-031 --Apple-Mail-40-56714919 Content-Disposition: attachment; filename=ivtools-091106-johnston-030 Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-091106-johnston-030" Content-Transfer-Encoding: 7bit Patch: ivtools-091106-johnston-030 For: ivtools-1.2 Author: [email protected] Subject: changes to compile on Cygwin (built but did't run) Requires: This is an intermediate patch to ivtools-1.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.16 ComTerp/comterp.c:1.17 *** ComTerp/comterp.c:1.16 Wed Aug 26 09:21:33 2009 --- src/ComTerp/comterp.c Fri Nov 6 08:19:28 2009 *************** *** 193,199 **** save_parser_client(); postfix_echo(); ! return status==0 && _pfbuf[_pfnum-1].type != TOK_EOF && _buffer[0] != '\0'; } boolean ComTerp::eof() { --- 193,201 ---- save_parser_client(); postfix_echo(); ! return status==0 ! && (_pfnum==0 || _pfbuf[_pfnum-1].type != TOK_EOF) ! && _buffer[0] != '\0'; } boolean ComTerp::eof() { Index: ComTerp/comterpserv.c diff -c ComTerp/comterpserv.c:1.5 ComTerp/comterpserv.c:1.6 *** ComTerp/comterpserv.c:1.5 Mon Sep 15 16:43:02 2008 --- src/ComTerp/comterpserv.c Fri Nov 6 08:19:28 2009 *************** *** 514,522 **** } postfix_token* ComTerpServ::gen_code(const char* script, int& ntoken) { load_string(script); read_expr(); ! return copy_postfix_tokens(ntoken); } void ComTerpServ::read_string(const char* script) { --- 514,525 ---- } postfix_token* ComTerpServ::gen_code(const char* script, int& ntoken) { + push_servstate(); load_string(script); read_expr(); ! postfix_token* copied_tokens = copy_postfix_tokens(ntoken); ! pop_servstate(); ! return copied_tokens; } void ComTerpServ::read_string(const char* script) { Index: ComTerp/ctrlfunc.c diff -c ComTerp/ctrlfunc.c:1.9 ComTerp/ctrlfunc.c:1.10 *** ComTerp/ctrlfunc.c:1.9 Mon May 18 16:42:52 2009 --- src/ComTerp/ctrlfunc.c Fri Nov 6 08:19:28 2009 *************** *** 221,227 **** } /*****************************************************************************/ ! int SocketObj::_symid = -1; SocketObj::SocketObj(const char* host, unsigned short port) { --- 221,227 ---- } /*****************************************************************************/ ! #ifdef HAVE_ACE int SocketObj::_symid = -1; SocketObj::SocketObj(const char* host, unsigned short port) { *************** *** 253,258 **** --- 253,259 ---- int SocketObj::get_handle() { return _socket->get_handle(); } + #endif /*****************************************************************************/ Index: ComTerp/ctrlfunc.h diff -c ComTerp/ctrlfunc.h:1.4 ComTerp/ctrlfunc.h:1.5 *** ComTerp/ctrlfunc.h:1.4 Mon Sep 15 16:43:02 2008 --- src/ComTerp/ctrlfunc.h Fri Nov 6 08:19:28 2009 *************** *** 111,116 **** --- 111,117 ---- CLASS_SYMID("SocketObj"); }; + #endif //: create socket object // sockobj=socket(hoststr portnum) -- create and open socket object *************** *** 123,129 **** virtual const char* docstring() { return "%s(hoststr portnum ) -- create and open socket object"; } }; - #endif //: eval string command for ComTerp. // str|lst=eval(cmdstr [cmdstr ...] :symret) -- evaluate string as commands, optionally returning symbol instead of nil. --- 124,129 ---- Index: ComTerp/randfunc.c diff -c ComTerp/randfunc.c:1.1 ComTerp/randfunc.c:1.2 *** ComTerp/randfunc.c:1.1 Wed Aug 29 10:37:49 2007 --- src/ComTerp/randfunc.c Fri Nov 6 08:19:28 2009 *************** *** 51,56 **** --- 51,62 ---- } } + ComValue retval(RandFunc::drand(minval, maxval)); + push_stack(retval); + + } + + double RandFunc::drand(double minval, double maxval) { #ifndef RAND_MAX #include <sys/limits.h> #define RAND_MAX INT_MAX *************** *** 61,71 **** int rnum = rand(); double rval = rnum*gain+bias; ! ComValue retval(rval); ! push_stack(retval); ! } /*****************************************************************************/ SRandFunc::SRandFunc(ComTerp* comterp) : ComFunc(comterp) { --- 67,76 ---- int rnum = rand(); double rval = rnum*gain+bias; ! return rval; } + /*****************************************************************************/ SRandFunc::SRandFunc(ComTerp* comterp) : ComFunc(comterp) { Index: ComTerp/randfunc.h diff -c ComTerp/randfunc.h:1.1 ComTerp/randfunc.h:1.2 *** ComTerp/randfunc.h:1.1 Wed Aug 29 10:37:49 2007 --- src/ComTerp/randfunc.h Fri Nov 6 08:19:29 2009 *************** *** 42,47 **** --- 42,49 ---- virtual const char* docstring() { return "val=%s([minval,maxval]) -- return random number between 0 and 1 or minval,maxval"; } + static double drand(double minval, double maxval); + }; //: command to seed ComTerp random number generator. Index: ComUnidraw/grfunc.c diff -c ComUnidraw/grfunc.c:1.7 ComUnidraw/grfunc.c:1.8 *** ComUnidraw/grfunc.c:1.7 Wed Aug 26 09:21:39 2009 --- src/ComUnidraw/grfunc.c Fri Nov 6 08:19:37 2009 *************** *** 939,944 **** --- 939,945 ---- Selection* sel = _ed->GetViewer()->GetSelection(); if (clear_flag) { sel->Clear(); + unidraw->Update(); reset_stack(); return; } Index: DrawServ/drawfunc.c diff -c DrawServ/drawfunc.c:1.3 DrawServ/drawfunc.c:1.4 *** DrawServ/drawfunc.c:1.3 Wed Aug 26 09:21:42 2009 --- src/DrawServ/drawfunc.c Fri Nov 6 08:19:42 2009 *************** *** 90,96 **** ((DrawServ*)unidraw)->cycletest (sidv.uint_val(), hostv.string_ptr(), userv.string_ptr(), pidv.int_val())) { #if 1 ! #if __GNUC__<4 fileptr_filebuf obuf(comterp()->handler()->get_handle(), ios_base::out, false, static_cast<size_t>(BUFSIZ)); #else fileptr_filebuf obuf(comterp()->handler()->get_handle(), ios_base::out, static_cast<size_t>(BUFSIZ)); --- 90,96 ---- ((DrawServ*)unidraw)->cycletest (sidv.uint_val(), hostv.string_ptr(), userv.string_ptr(), pidv.int_val())) { #if 1 ! #if __GNUC__<4 && !defined(__CYGWIN__) fileptr_filebuf obuf(comterp()->handler()->get_handle(), ios_base::out, false, static_cast<size_t>(BUFSIZ)); #else fileptr_filebuf obuf(comterp()->handler()->get_handle(), ios_base::out, static_cast<size_t>(BUFSIZ)); Index: DrawServ/drawlink.c diff -c DrawServ/drawlink.c:1.2 DrawServ/drawlink.c:1.3 *** DrawServ/drawlink.c:1.2 Sat Oct 25 10:25:09 2008 --- src/DrawServ/drawlink.c Fri Nov 6 08:19:42 2009 *************** *** 99,105 **** if (ComterpHandler::reactor_singleton()->register_handler(ackhandler(), ACE_Event_Handler::READ_MASK|ACE_Event_Handler::TIMER_MASK)==-1) fprintf(stderr, "drawserv: error registering ackback handler (handle==%d)\n", _socket->get_handle()); ! #if __GNUC__<4 fileptr_filebuf obuf(_socket->get_handle(), ios_base::out, false, static_cast<size_t>(BUFSIZ)); #else fileptr_filebuf obuf(_socket->get_handle(), ios_base::out, static_cast<size_t>(BUFSIZ)); --- 99,105 ---- if (ComterpHandler::reactor_singleton()->register_handler(ackhandler(), ACE_Event_Handler::READ_MASK|ACE_Event_Handler::TIMER_MASK)==-1) fprintf(stderr, "drawserv: error registering ackback handler (handle==%d)\n", _socket->get_handle()); ! #if __GNUC__<4 && !defined(__CYGWIN__) fileptr_filebuf obuf(_socket->get_handle(), ios_base::out, false, static_cast<size_t>(BUFSIZ)); #else fileptr_filebuf obuf(_socket->get_handle(), ios_base::out, static_cast<size_t>(BUFSIZ)); Index: DrawServ/drawserv.c diff -c DrawServ/drawserv.c:1.2 DrawServ/drawserv.c:1.3 *** DrawServ/drawserv.c:1.2 Sat Oct 25 10:25:09 2008 --- src/DrawServ/drawserv.c Fri Nov 6 08:19:42 2009 *************** *** 368,374 **** if (link && link != orglink && link->state()==DrawLink::two_way) { int fd = link->handle(); if (fd>=0) { ! #if __GNUC__<4 fileptr_filebuf fbuf(fd, ios_base::out, false, static_cast<size_t>(BUFSIZ)); #else fileptr_filebuf fbuf(fd, ios_base::out, static_cast<size_t>(BUFSIZ)); --- 368,374 ---- if (link && link != orglink && link->state()==DrawLink::two_way) { int fd = link->handle(); if (fd>=0) { ! #if __GNUC__<4 && !defined(__CYGWIN__) fileptr_filebuf fbuf(fd, ios_base::out, false, static_cast<size_t>(BUFSIZ)); #else fileptr_filebuf fbuf(fd, ios_base::out, static_cast<size_t>(BUFSIZ)); *************** *** 390,396 **** if (link) { int fd = link->handle(); if (fd>=0) { ! #if __GNUC__<4 fileptr_filebuf fbuf(fd, ios_base::out, false, static_cast<size_t>(BUFSIZ)); #else fileptr_filebuf fbuf(fd, ios_base::out, static_cast<size_t>(BUFSIZ)); --- 390,396 ---- if (link) { int fd = link->handle(); if (fd>=0) { ! #if __GNUC__<4 && !defined(__CYGWIN__) fileptr_filebuf fbuf(fd, ios_base::out, false, static_cast<size_t>(BUFSIZ)); #else fileptr_filebuf fbuf(fd, ios_base::out, static_cast<size_t>(BUFSIZ)); Index: OverlayUnidraw/ovunidraw.c diff -c OverlayUnidraw/ovunidraw.c:1.2 OverlayUnidraw/ovunidraw.c:1.3 *** OverlayUnidraw/ovunidraw.c:1.2 Sun Sep 30 13:49:19 2007 --- src/OverlayUnidraw/ovunidraw.c Fri Nov 6 08:19:35 2009 *************** *** 73,78 **** --- 73,79 ---- _ovviewer = nil; _comterp = nil; _npause = 0; + _run_once = 0; /* replace default Painter with an OverlayPainter */ OverlayGraphic::new_painter(); *************** *** 84,89 **** --- 85,91 ---- _ovviewer = nil; _comterp = nil; _npause = 0; + _run_once = 0; } OverlayUnidraw::~OverlayUnidraw () *************** *** 145,150 **** --- 147,157 ---- if (updated()) { Update(true); } + + if(run_once()) { + _run_once--; + break; + } } _npause = _comterp ? _comterp->npause() : 0; Index: OverlayUnidraw/ovunidraw.h diff -c OverlayUnidraw/ovunidraw.h:1.2 OverlayUnidraw/ovunidraw.h:1.3 *** OverlayUnidraw/ovunidraw.h:1.2 Sun Sep 30 13:49:19 2007 --- src/OverlayUnidraw/ovunidraw.h Fri Nov 6 08:19:35 2009 *************** *** 80,87 **** --- 80,93 ---- static void deferred_notifications(boolean flag) { _deferred_notifications = flag; } // set flag that indicates deferred notifications + + void run_once(int flag) { _run_once = true; } + int run_once() { return _run_once; } + virtual void RunOnce() { run_once(10);Run(); } + // run OverlayUnidraw just once protected: + int _run_once; static MacroCmd* _cmdq; static boolean* _updated_ptr; OverlayViewer* _ovviewer; Index: src_dispatch/dispatcher.c diff -c src_dispatch/dispatcher.c:1.3 src_dispatch/dispatcher.c:1.4 *** src_dispatch/dispatcher.c:1.3 Fri Apr 18 09:33:01 2008 --- src/Dispatch/dispatcher.c Fri Nov 6 08:19:30 2009 *************** *** 659,665 **** #endif #else #ifdef SA_NOCLDSTOP /* POSIX */ ! #if defined(hpux) || defined(linux) || defined(sun) && defined(__svr4__) sa.sa_handler = (void (*)(int))(&Dispatcher::sigCLD); #else sa.sa_handler = fxSIGACTIONHANDLER(&Dispatcher::sigCLD); --- 659,665 ---- #endif #else #ifdef SA_NOCLDSTOP /* POSIX */ ! #if defined(__CYGWIN__) || defined(hpux) || defined(linux) || defined(sun) && defined(__svr4__) sa.sa_handler = (void (*)(int))(&Dispatcher::sigCLD); #else sa.sa_handler = fxSIGACTIONHANDLER(&Dispatcher::sigCLD); Index: Time/Date.c diff -c Time/Date.c:1.2 Time/Date.c:1.3 *** Time/Date.c:1.2 Wed Aug 26 11:01:22 2009 --- src/Time/Date.c Fri Nov 6 08:19:32 2009 *************** *** 61,67 **** */ #include <Time/Date.h> ! #include <Time/Time.h> #include <OS/string.h> #include <iomanip> --- 61,67 ---- */ #include <Time/Date.h> ! #include <Time/Time_.h> #include <OS/string.h> #include <iomanip> Index: Time/Time.c diff -c Time/Time.c:1.3 Time/Time.c:1.4 *** Time/Time.c:1.3 Wed Aug 26 11:01:22 2009 --- src/Time/Time.c Fri Nov 6 08:19:32 2009 *************** *** 29,35 **** */ #include <Time/Date.h> ! #include <Time/Time.h> #include <iomanip> using namespace std; --- 29,35 ---- */ #include <Time/Date.h> ! #include <Time/Time_.h> #include <iomanip> using namespace std; Index: Time/Time.h diff -c Time/Time.h:1.2 Time/Time.h:removed *** Time/Time.h:1.2 Fri May 16 10:47:44 2008 --- src/Time/Time.h Fri Nov 6 08:19:33 2009 *************** *** 1,160 **** - - /* Time.h -- declarations for class Time - THIS SOFTWARE FITS THE DESCRIPTION IN THE U.S. COPYRIGHT ACT OF A - "UNITED STATES GOVERNMENT WORK". IT WAS WRITTEN AS A PART OF THE - AUTHOR'S OFFICIAL DUTIES AS A GOVERNMENT EMPLOYEE. THIS MEANS IT - CANNOT BE COPYRIGHTED. THIS SOFTWARE IS FREELY AVAILABLE TO THE - PUBLIC FOR USE WITHOUT A COPYRIGHT NOTICE, AND THERE ARE NO - RESTRICTIONS ON ITS USE, NOW OR SUBSEQUENTLY. - - Author: - K. E. Gorlen - Computer Systems Laboratory, DCRT - National Institutes of Health - Bethesda, MD 20892 - - /* Log: Time.h,v - * Revision 3.11 92/07/26 14:33:59 sandy - * include directive in form '#include <nihcl/foo.h>' - * - * Revision 3.10 91/02/18 21:08:49 kgorlen - * Release for 3rd printing of 1st edition. - * - * Revision 3.1 90/12/22 08:58:38 kgorlen - * Change NESTED_TYPES to NO_NESTED_TYPES. - * - * Revision 3.0 90/05/20 00:21:46 kgorlen - * Release for 1st edition. - * - */ - - #ifndef TIME_H - #define TIME_H - - - #if defined(SYSV) && ! defined(hpux) - - #include <time.h> - - #define TIME_ZONE timezone - #define DST_OBSERVED daylight - #define BASE_CLASSES BASE::desc() - #define MEMBER_CLASSES - #define VIRTUAL_BASE_CLASSES Object::desc() - - #endif - - //moved from Time.c - - #if defined(BSD) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) - - #if defined(__APPLE__) - #include_next <time.h> - #endif - - #include <sys/time.h> - #if defined(__NetBSD__) - #include </usr/include/sys/time.h> - #endif - - #endif - - - #if defined(hpux) - #include <time.h> - #endif - - - #if defined(linux) || defined(__sun) || defined(__alpha) || defined(__CYGWIN__) - #include <sys/time.h> - - #if defined(__DECCXX) || (defined(__sun) && !defined(__svr4__)) - extern "C" { - int gettimeofday(struct timeval *tp, struct timezone *tzp); - } - #endif - #endif - - // END of edits - - - /* - Modified by Vectaport, Inc. - */ - - #include <OS/types.h> - #if !defined(__APPLE_) - #include <iostream.h> - #include_next <time.h> - #else - #include <iosfwd> - #include <iostream> - #endif - - #define NO_NESTED_TYPES 1 - - class Date; - - #ifdef NO_NESTED_TYPES - typedef unsigned short hourTy; - typedef unsigned short minuteTy; - typedef unsigned short secondTy; - typedef unsigned long clockTy; - #endif - - using std::cout; - - class Time { - - public: // type definitions - #ifndef NO_NESTED_TYPES - typedef unsigned short hourTy; - typedef unsigned short minuteTy; - typedef unsigned short secondTy; - typedef unsigned long clockTy; - #endif - private: - clockTy sec; /* seconds since 1/1/1901 */ - boolean isDST() const; - Time localTime() const; - private: // static member functions - static Time localTime(const Date& date, hourTy h=0, minuteTy m=0, secondTy s=0); - static Time beginDST(unsigned year); - static Time endDST(unsigned year); - public: - Time(); // current time - Time(clockTy s) { sec = s; } - Time(hourTy h, minuteTy m, secondTy s =0, boolean dst =false); - Time(const Date&, hourTy h =0, minuteTy m =0, secondTy s=0, boolean dst =false); - Date date() const; - boolean operator<(const Time& t) const { return sec < t.sec; } - boolean operator<=(const Time& t) const { return sec <= t.sec; } - boolean operator>(const Time& t) const { return sec > t.sec; } - boolean operator>=(const Time& t) const { return sec >= t.sec; } - boolean operator==(const Time& t) const { return sec == t.sec; } - boolean operator!=(const Time& t) const { return sec != t.sec; } - friend Time operator+(const Time& t, long s) { return Time(t.sec+s); } - friend Time operator+(long s, const Time& t) { return Time(t.sec+s); } - long operator-(const Time& t) const { return sec - t.sec; } - Time operator-(long s) const { return Time(sec-s); } - void operator+=(long s) { sec += s; } - void operator-=(long s) { sec -= s; } - boolean between(const Time& a, const Time& b) const; - hourTy hour() const; // hour in local time - hourTy hourGMT() const; // hour in GMT - minuteTy minute() const; // minute in local time - minuteTy minuteGMT() const; // minute in GMT - secondTy second() const; // second in local time or GMT - clockTy seconds() const { return sec; } - - #undef min - #undef max - - Time max(const Time&) const; - Time min(const Time&) const; - virtual void printOn(ostream& strm =cout) const; - - friend ostream& operator << (ostream& s, const Time&); - }; - - #endif /* TIMEH */ --- 0 ---- Index: Time/Time_.h diff -c /dev/null Time/Time_.h:1.1 *** /dev/null Fri Nov 6 08:19:33 2009 --- src/Time/Time_.h Fri Nov 6 08:19:32 2009 *************** *** 0 **** --- 1,160 ---- + + /* Time.h -- declarations for class Time + THIS SOFTWARE FITS THE DESCRIPTION IN THE U.S. COPYRIGHT ACT OF A + "UNITED STATES GOVERNMENT WORK". IT WAS WRITTEN AS A PART OF THE + AUTHOR'S OFFICIAL DUTIES AS A GOVERNMENT EMPLOYEE. THIS MEANS IT + CANNOT BE COPYRIGHTED. THIS SOFTWARE IS FREELY AVAILABLE TO THE + PUBLIC FOR USE WITHOUT A COPYRIGHT NOTICE, AND THERE ARE NO + RESTRICTIONS ON ITS USE, NOW OR SUBSEQUENTLY. + + Author: + K. E. Gorlen + Computer Systems Laboratory, DCRT + National Institutes of Health + Bethesda, MD 20892 + + /* Log: Time.h,v + * Revision 3.11 92/07/26 14:33:59 sandy + * include directive in form '#include <nihcl/foo.h>' + * + * Revision 3.10 91/02/18 21:08:49 kgorlen + * Release for 3rd printing of 1st edition. + * + * Revision 3.1 90/12/22 08:58:38 kgorlen + * Change NESTED_TYPES to NO_NESTED_TYPES. + * + * Revision 3.0 90/05/20 00:21:46 kgorlen + * Release for 1st edition. + * + */ + + #ifndef TIME_H + #define TIME_H + + + #if defined(SYSV) && ! defined(hpux) + + #include <time.h> + + #define TIME_ZONE timezone + #define DST_OBSERVED daylight + #define BASE_CLASSES BASE::desc() + #define MEMBER_CLASSES + #define VIRTUAL_BASE_CLASSES Object::desc() + + #endif + + //moved from Time.c + + #if defined(BSD) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) + + #if defined(__APPLE__) + #include_next <time.h> + #endif + + #include <sys/time.h> + #if defined(__NetBSD__) + #include </usr/include/sys/time.h> + #endif + + #endif + + + #if defined(hpux) + #include <time.h> + #endif + + + #if defined(linux) || defined(__sun) || defined(__alpha) || defined(__CYGWIN__) + #include <sys/time.h> + + #if defined(__DECCXX) || (defined(__sun) && !defined(__svr4__)) + extern "C" { + int gettimeofday(struct timeval *tp, struct timezone *tzp); + } + #endif + #endif + + // END of edits + + + /* + Modified by Vectaport, Inc. + */ + + #include <OS/types.h> + #if !defined(__APPLE_) + #include <iostream.h> + #include_next <time.h> + #else + #include <iosfwd> + #include <iostream> + #endif + + #define NO_NESTED_TYPES 1 + + class Date; + + #ifdef NO_NESTED_TYPES + typedef unsigned short hourTy; + typedef unsigned short minuteTy; + typedef unsigned short secondTy; + typedef unsigned long clockTy; + #endif + + using std::cout; + + class Time { + + public: // type definitions + #ifndef NO_NESTED_TYPES + typedef unsigned short hourTy; + typedef unsigned short minuteTy; + typedef unsigned short secondTy; + typedef unsigned long clockTy; + #endif + private: + clockTy sec; /* seconds since 1/1/1901 */ + boolean isDST() const; + Time localTime() const; + private: // static member functions + static Time localTime(const Date& date, hourTy h=0, minuteTy m=0, secondTy s=0); + static Time beginDST(unsigned year); + static Time endDST(unsigned year); + public: + Time(); // current time + Time(clockTy s) { sec = s; } + Time(hourTy h, minuteTy m, secondTy s =0, boolean dst =false); + Time(const Date&, hourTy h =0, minuteTy m =0, secondTy s=0, boolean dst =false); + Date date() const; + boolean operator<(const Time& t) const { return sec < t.sec; } + boolean operator<=(const Time& t) const { return sec <= t.sec; } + boolean operator>(const Time& t) const { return sec > t.sec; } + boolean operator>=(const Time& t) const { return sec >= t.sec; } + boolean operator==(const Time& t) const { return sec == t.sec; } + boolean operator!=(const Time& t) const { return sec != t.sec; } + friend Time operator+(const Time& t, long s) { return Time(t.sec+s); } + friend Time operator+(long s, const Time& t) { return Time(t.sec+s); } + long operator-(const Time& t) const { return sec - t.sec; } + Time operator-(long s) const { return Time(sec-s); } + void operator+=(long s) { sec += s; } + void operator-=(long s) { sec -= s; } + boolean between(const Time& a, const Time& b) const; + hourTy hour() const; // hour in local time + hourTy hourGMT() const; // hour in GMT + minuteTy minute() const; // minute in local time + minuteTy minuteGMT() const; // minute in GMT + secondTy second() const; // second in local time or GMT + clockTy seconds() const { return sec; } + + #undef min + #undef max + + Time max(const Time&) const; + Time min(const Time&) const; + virtual void printOn(ostream& strm =cout) const; + + friend ostream& operator << (ostream& s, const Time&); + }; + + #endif /* TIMEH */ Index: Time/obstime.h diff -c Time/obstime.h:1.1 Time/obstime.h:1.2 *** Time/obstime.h:1.1 Wed Aug 29 10:38:05 2007 --- src/Time/obstime.h Fri Nov 6 08:19:32 2009 *************** *** 25,31 **** #define obstime_h #include <InterViews/observe.h> ! #include <Time/Time.h> class ObservableTime : public Observable { public: --- 25,31 ---- #define obstime_h #include <InterViews/observe.h> ! #include <Time/Time_.h> class ObservableTime : public Observable { public: Index: Time/timeglyph.c diff -c Time/timeglyph.c:1.1 Time/timeglyph.c:1.2 *** Time/timeglyph.c:1.1 Wed Aug 29 10:38:05 2007 --- src/Time/timeglyph.c Fri Nov 6 08:19:32 2009 *************** *** 22,28 **** */ #include <InterViews/enter-scope.h> ! #include <Time/Time.h> #include <Time/Date.h> #include <Time/obstime.h> #include <Time/timeglyph.h> --- 22,28 ---- */ #include <InterViews/enter-scope.h> ! #include <Time/Time_.h> #include <Time/Date.h> #include <Time/obstime.h> #include <Time/timeglyph.h> Index: top_ivtools/MANIFEST diff -c top_ivtools/MANIFEST:1.5 top_ivtools/MANIFEST:1.6 *** top_ivtools/MANIFEST:1.5 Mon May 18 16:42:49 2009 --- ./MANIFEST Fri Nov 6 08:19:27 2009 *************** *** 804,810 **** ivtools-1.2/src/Time/Imakefile ivtools-1.2/src/Time/Makefile ivtools-1.2/src/Time/Time.c ! ivtools-1.2/src/Time/Time.h ivtools-1.2/src/Time/obstime.c ivtools-1.2/src/Time/obstime.h ivtools-1.2/src/Time/timeglyph.c --- 804,810 ---- ivtools-1.2/src/Time/Imakefile ivtools-1.2/src/Time/Makefile ivtools-1.2/src/Time/Time.c ! ivtools-1.2/src/Time/Time_.h ivtools-1.2/src/Time/obstime.c ivtools-1.2/src/Time/obstime.h ivtools-1.2/src/Time/timeglyph.c Index: top_ivtools/MANIFEST.perceps diff -c top_ivtools/MANIFEST.perceps:1.4 top_ivtools/MANIFEST.perceps:1.5 *** top_ivtools/MANIFEST.perceps:1.4 Mon May 18 16:42:49 2009 --- ./MANIFEST.perceps Fri Nov 6 08:19:27 2009 *************** *** 225,231 **** TIFF/tiffcompat.h TIFF/tiffioP.h Time/Date.h ! Time/Time.h Time/obstime.h Time/timeglyph.h TopoFace/fgeomobjs.h --- 225,231 ---- TIFF/tiffcompat.h TIFF/tiffioP.h Time/Date.h ! Time/Time_.h Time/obstime.h Time/timeglyph.h TopoFace/fgeomobjs.h *** /dev/null Fri Nov 6 08:19:45 PST 2009 --- patches/ivtools-091106-johnston-030 *************** patches/ivtools-091106-johnston-030 *** 0 **** --- 1 ---- + ivtools-091106-johnston-030 --Apple-Mail-40-56714919 Content-Disposition: attachment; filename=ivtools-090826-johnston-029 Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-090826-johnston-029" Content-Transfer-Encoding: 7bit Patch: ivtools-090826-johnston-029 For: ivtools-1.2 Author: [email protected] Subject: last patch for 1.2.7 Requires: This is an intermediate patch to ivtools-1.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: Index: Attribute/attrvalue.c diff -c Attribute/attrvalue.c:1.5 Attribute/attrvalue.c:1.6 *** Attribute/attrvalue.c:1.5 Wed Aug 26 09:21:32 2009 --- src/Attribute/attrvalue.c Wed Aug 26 11:01:18 2009 *************** *** 39,44 **** --- 39,46 ---- #endif #include <stdio.h> #include <string.h> + #include <cstdio> + using namespace std; #ifdef LEAKCHECK #include <leakchecker.h> Index: examples3.1_bvalue/main.c diff -c examples3.1_bvalue/main.c:1.1 examples3.1_bvalue/main.c:1.2 *** examples3.1_bvalue/main.c:1.1 Wed Aug 29 10:38:28 2007 --- src/glyphs/examples3.1/bvalue/main.c Wed Aug 26 11:01:26 2009 *************** *** 8,13 **** --- 8,15 ---- #include <InterViews/window.h> #include <OS/string.h> #include <stdio.h> + #include <cstdio> // for sprintf + using namespace std; class App : public Observer { public: Index: examples3.1_fonts/main.c diff -c examples3.1_fonts/main.c:1.1 examples3.1_fonts/main.c:1.2 *** examples3.1_fonts/main.c:1.1 Wed Aug 29 10:38:31 2007 --- src/glyphs/examples3.1/fonts/main.c Wed Aug 26 11:01:27 2009 *************** *** 5,10 **** --- 5,12 ---- #include <OS/string.h> #include <stdio.h> #include <stdlib.h> + #include <cstdio> + using namespace std; static PropertyData props[] = { { "*family", "Times" }, Index: examples3.1_ips/main.c diff -c examples3.1_ips/main.c:1.1 examples3.1_ips/main.c:1.2 *** examples3.1_ips/main.c:1.1 Wed Aug 29 10:38:34 2007 --- src/glyphs/examples3.1/ips/main.c Wed Aug 26 11:01:28 2009 *************** *** 12,17 **** --- 12,19 ---- #include <OS/string.h> #include <stdio.h> #include <stdlib.h> + #include <cstdio> + using namespace std; static PropertyData props[] = { { nil } Index: examples3.1_preview/main.c diff -c examples3.1_preview/main.c:1.1 examples3.1_preview/main.c:1.2 *** examples3.1_preview/main.c:1.1 Wed Aug 29 10:38:37 2007 --- src/glyphs/examples3.1/preview/main.c Wed Aug 26 11:01:29 2009 *************** *** 13,18 **** --- 13,20 ---- #include <OS/string.h> #include <stdio.h> #include <stdlib.h> + #include <cstdio> + using namespace std; class DocumentView : public MonoGlyph { public: Index: glyph_morpher/glypheditor.c diff -c glyph_morpher/glypheditor.c:1.1 glyph_morpher/glypheditor.c:1.2 *** glyph_morpher/glypheditor.c:1.1 Wed Aug 29 10:38:14 2007 --- src/glyphs/morpher/glypheditor.c Wed Aug 26 11:01:24 2009 *************** *** 20,31 **** --- 20,34 ---- #include <OS/string.h> #include <stdio.h> #include <string.h> + #include <cstdio> // for sprintf + using namespace std; #include <IVGlyph/figure.h> #include "morpher.h" #include "glypheditor.h" #include "glyphviewer.h" #include <IVGlyph/idraw.h> + typedef void (GlyphViewer::*ToolSetter) (unsigned int); class CatalogButton : public Button { *************** *** 208,214 **** _chooser = DialogKit::instance()->file_chooser(".", style); Resource::ref(_chooser); char buf[256]; ! sprintf(buf, "Select an idraw drawing to import:"); style->attribute("caption", ""); style->attribute("subcaption", buf); } else { --- 211,217 ---- _chooser = DialogKit::instance()->file_chooser(".", style); Resource::ref(_chooser); char buf[256]; ! std::sprintf(buf, "Select an idraw drawing to import:"); style->attribute("caption", ""); style->attribute("subcaption", buf); } else { Index: OverlayUnidraw/ovdialog.c diff -c OverlayUnidraw/ovdialog.c:1.1 OverlayUnidraw/ovdialog.c:1.2 *** OverlayUnidraw/ovdialog.c:1.1 Wed Aug 29 10:38:50 2007 --- src/OverlayUnidraw/ovdialog.c Wed Aug 26 11:01:35 2009 *************** *** 37,42 **** --- 37,44 ---- #include <stdio.h> #include <stdlib.h> #include <string.h> + #include <cstdio> + using namespace std; /*****************************************************************************/ Index: scrollfield/main.c diff -c scrollfield/main.c:1.1 scrollfield/main.c:1.2 *** scrollfield/main.c:1.1 Wed Aug 29 10:38:17 2007 --- src/glyphs/scrollfield/main.c Wed Aug 26 11:01:25 2009 *************** *** 38,43 **** --- 38,45 ---- #include <IV-look/slider.h> #include <stdio.h> + #include <cstdio> // for sprintf + using namespace std; declareActionCallback(Session) Index: Time/Date.c diff -c Time/Date.c:1.1 Time/Date.c:1.2 *** Time/Date.c:1.1 Wed Aug 29 10:38:05 2007 --- src/Time/Date.c Wed Aug 26 11:01:22 2009 *************** *** 64,70 **** #include <Time/Time.h> #include <OS/string.h> ! #include <iomanip.h> #include <ctype.h> #include <string.h> #include <stdio.h> --- 64,71 ---- #include <Time/Time.h> #include <OS/string.h> ! #include <iomanip> ! using namespace std; #include <ctype.h> #include <string.h> #include <stdio.h> Index: Time/Time.c diff -c Time/Time.c:1.2 Time/Time.c:1.3 *** Time/Time.c:1.2 Fri May 16 10:47:44 2008 --- src/Time/Time.c Wed Aug 26 11:01:22 2009 *************** *** 30,36 **** #include <Time/Date.h> #include <Time/Time.h> ! #include <iomanip.h> #include <stdio.h> --- 30,37 ---- #include <Time/Date.h> #include <Time/Time.h> ! #include <iomanip> ! using namespace std; #include <stdio.h> Index: top_ivtools/CHANGES diff -c top_ivtools/CHANGES:1.9 top_ivtools/CHANGES:1.10 *** top_ivtools/CHANGES:1.9 Wed Aug 26 09:44:26 2009 --- ./CHANGES Wed Aug 26 11:01:16 2009 *************** *** 18,23 **** --- 18,25 ---- - port to Ubuntu Heron + - applied (most of) patch to build on Fedora 10 contributed by John Heidemann + - balance of changes to support ipl-1.0.4 July 9th, 2008 ivtools-1.2.6 Index: Unidraw/dialogs.c diff -c Unidraw/dialogs.c:1.1 Unidraw/dialogs.c:1.2 *** Unidraw/dialogs.c:1.1 Wed Aug 29 10:38:45 2007 --- src/Unidraw/dialogs.c Wed Aug 26 11:01:32 2009 *************** *** 49,54 **** --- 49,56 ---- #include <stdio.h> #include <stdlib.h> #include <string.h> + #include <cstdio> + using namespace std; /*****************************************************************************/ Index: UniIdraw/idcatalog.c diff -c UniIdraw/idcatalog.c:1.4 UniIdraw/idcatalog.c:1.5 *** UniIdraw/idcatalog.c:1.4 Fri May 16 10:47:53 2008 --- src/UniIdraw/idcatalog.c Wed Aug 26 11:01:33 2009 *************** *** 57,62 **** --- 57,64 ---- #include <string.h> #include <fstream.h> #include <iostream> + #include <cstdio> + using namespace std; using std::cerr; Index: UniIdraw/iddialogs.c diff -c UniIdraw/iddialogs.c:1.1 UniIdraw/iddialogs.c:1.2 *** UniIdraw/iddialogs.c:1.1 Wed Aug 29 10:38:46 2007 --- src/UniIdraw/iddialogs.c Wed Aug 26 11:01:33 2009 *************** *** 41,46 **** --- 41,48 ---- #include <stdio.h> #include <stdlib.h> #include <string.h> + #include <cstdio> + using namespace std; /*****************************************************************************/ *** /dev/null Wed Aug 26 11:01:43 PDT 2009 --- patches/ivtools-090826-johnston-029 *************** patches/ivtools-090826-johnston-029 *** 0 **** --- 1 ---- + ivtools-090826-johnston-029 --Apple-Mail-40-56714919 Content-Disposition: attachment; filename=ivtools-090826-johnston-028 Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-090826-johnston-028" Content-Transfer-Encoding: 7bit Patch: ivtools-090826-johnston-028 For: ivtools-1.2 Author: [email protected] Subject: CH-CH-CH-CHANGES Requires: This is an intermediate patch to ivtools-1.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: Index: top_ivtools/CHANGES diff -c top_ivtools/CHANGES:1.8 top_ivtools/CHANGES:1.9 *** top_ivtools/CHANGES:1.8 Wed Aug 26 09:21:30 2009 --- ./CHANGES Wed Aug 26 09:44:26 2009 *************** *** 1,5 **** --- 1,23 ---- August 25th, 2009 ivtools-1.2.7 + - series of memory leak checking commands: alistleak, attrvleak, commandleak, compleak, graphlicleak, mlineleak, viewleak. Each returns the current number of allocated objects of that type (AttributeValueList, AttributeValue, Command, OverlayComp, Graphic, MultiLineObj, and OverlayView). + + - added reference counting to OverlayView's (ComponentView's) referred from AttributeValue's (#define RESOURCE_COMPVIEW) + + - fixed attrname func. + + - fixed stddev func. + + - added BooleanType to NumFunc promotion method. + + - fixed graphdraw copy/paste of graph fragments + + - new SocketObj for use comterp + + - fix behavior of symbol manipulating funcs, by using internal bquote. + + - port to Ubuntu Heron + - balance of changes to support ipl-1.0.4 July 9th, 2008 ivtools-1.2.6 *** /dev/null Wed Aug 26 09:44:30 PDT 2009 --- patches/ivtools-090826-johnston-028 *************** patches/ivtools-090826-johnston-028 *** 0 **** --- 1 ---- + ivtools-090826-johnston-028 --Apple-Mail-40-56714919 Content-Disposition: attachment; filename=ivtools-090826-johnston-027 Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-090826-johnston-027" Content-Transfer-Encoding: quoted-printable Patch:=20=20=20=20ivtools-090826-johnston-027=0AFor:=20=20=20=20=20=20= ivtools-1.2=0AAuthor:[email protected]=0ASubject:=20= =20changes=20for=20ipl-1.0.4=0ARequires:=20=0A=0AThis=20is=20an=20= intermediate=20patch=20to=20ivtools-1.2.=20=20To=20apply,=20cd=20to=20= the=0Atop-level=20directory=20of=20the=20ivtools=20source=20tree=20(the=20= directory=20with=20src=0Aand=20config=20subdirs),=20and=20apply=20like=20= this:=0A=0A=09patch=20-p0=20<ThisFile=0A=0ASummary=20of=20Changes:=0A=0A= Index:=20Attribute/attrlist.c=0Adiff=20-c=20Attribute/attrlist.c:1.8=20= Attribute/attrlist.c:1.9=0A***=20Attribute/attrlist.c:1.8=09Mon=20May=20= 18=2016:42:50=202009=0A---=20src/Attribute/attrlist.c=09Wed=20Aug=2026=20= 09:21:32=202009=0A***************=0A***=2042,52=20****=0A=20=20=0A=20=20= #include=20<IV-2_6/_enter.h>=0A=20=20=0A-=20//#define=20LEAKCHECK=0A-=20=0A= =20=20#ifdef=20LEAKCHECK=0A!=20#include=20<ivstd/leakchecker.h>=0A!=20= LeakChecker=20AttributeValueListchecker("AttributeValueList");=0A=20=20= #endif=0A=20=20=0A=20=20=0A---=2042,50=20----=0A=20=20=0A=20=20#include=20= <IV-2_6/_enter.h>=0A=20=20=0A=20=20#ifdef=20LEAKCHECK=0A!=20#include=20= <leakchecker.h>=0A!=20LeakChecker*=20AttributeValueList::_leakchecker=20= =3D=20nil;=0A=20=20#endif=0A=20=20=0A=20=20=0A***************=0A***=20= 309,315=20****=0A=20=20=0A=20=20AttributeValueList::AttributeValueList=20= (AttributeValueList*=20s)=20{=0A=20=20#ifdef=20LEAKCHECK=0A!=20=20=20=20=20= AttributeValueListchecker.create();=0A=20=20#endif=0A=20=20=20=20=20=20= _alist=20=3D=20new=20AList;=0A=20=20=20=20=20=20_count=20=3D=200;=0A---=20= 307,314=20----=0A=20=20=0A=20=20AttributeValueList::AttributeValueList=20= (AttributeValueList*=20s)=20{=0A=20=20#ifdef=20LEAKCHECK=0A!=20=20=20=20=20= if(!_leakchecker)=20_leakchecker=20=3D=20new=20= LeakChecker("AttributeValueList");=0A!=20=20=20=20=20= _leakchecker->create();=0A=20=20#endif=0A=20=20=20=20=20=20_alist=20=3D=20= new=20AList;=0A=20=20=20=20=20=20_count=20=3D=200;=0A***************=0A= ***=20325,331=20****=0A=20=20=0A=20=20= AttributeValueList::~AttributeValueList=20()=20{=20=0A=20=20#ifdef=20= LEAKCHECK=0A!=20=20=20=20=20AttributeValueListchecker.destroy();=0A=20=20= #endif=0A=20=20=20=20=20=20if=20(_alist)=20{=0A=20=20=20=20=20=20=20=20=20= =20ALIterator=20i;=0A---=20324,330=20----=0A=20=20=0A=20=20= AttributeValueList::~AttributeValueList=20()=20{=20=0A=20=20#ifdef=20= LEAKCHECK=0A!=20=20=20=20=20_leakchecker->destroy();=0A=20=20#endif=0A=20= =20=20=20=20=20if=20(_alist)=20{=0A=20=20=20=20=20=20=20=20=20=20= ALIterator=20i;=0AIndex:=20Attribute/attrlist.h=0Adiff=20-c=20= Attribute/attrlist.h:1.2=20Attribute/attrlist.h:1.3=0A***=20= Attribute/attrlist.h:1.2=09Sat=20Oct=20=206=2011:10:27=202007=0A---=20= src/Attribute/attrlist.h=09Wed=20Aug=2026=2009:21:32=202009=0A= ***************=0A***=2029,34=20****=0A---=2029,39=20----=0A=20=20= #ifndef=20attr_list_h=0A=20=20#define=20attr_list_h=0A=20=20=0A+=20= #define=20LEAKCHECK=0A+=20#ifdef=20LEAKCHECK=0A+=20class=20LeakChecker;=0A= +=20#endif=0A+=20=0A=20=20#include=20<OS/enter-scope.h>=0A=20=20#include=20= <InterViews/resource.h>=0A=20=20#include=20<Attribute/classid.h>=0A= ***************=0A***=20241,246=20****=0A---=20246,256=20----=0A=20=20=20= =20=20=20AList*=20_alist;=0A=20=20=20=20=20=20unsigned=20int=20_count;=0A= =20=20=20=20=20=20boolean=20_nested_insert;=0A+=20=0A+=20#ifdef=20= LEAKCHECK=0A+=20=20public:=0A+=20=20=20=20=20static=20LeakChecker*=20= _leakchecker;=0A+=20#endif=0A=20=20};=0A=20=20=0A=20=20#endif=0AIndex:=20= Attribute/attrvalue.c=0Adiff=20-c=20Attribute/attrvalue.c:1.4=20= Attribute/attrvalue.c:1.5=0A***=20Attribute/attrvalue.c:1.4=09Fri=20Feb=20= 15=2010:42:46=202008=0A---=20src/Attribute/attrvalue.c=09Wed=20Aug=2026=20= 09:21:32=202009=0A***************=0A***=2028,33=20****=0A---=2028,38=20= ----=0A=20=20#include=20<Attribute/attrvalue.h>=0A=20=20#include=20= <Attribute/attrlist.h>=0A=20=20=0A+=20#ifdef=20RESOURCE_COMPVIEW=0A+=20= #include=20<Unidraw/Components/component.h>=0A+=20#include=20= <Unidraw/Components/compview.h>=0A+=20#endif=0A+=20=0A=20=20#include=20= <iostream.h>=0A=20=20#if=20!defined(solaris)=0A=20=20#include=20= <memory.h>=0A***************=0A***=2035,55=20****=0A=20=20#include=20= <stdio.h>=0A=20=20#include=20<string.h>=0A=20=20=0A-=20//#define=20= LEAKCHECK=0A-=20=0A=20=20#ifdef=20LEAKCHECK=0A!=20#include=20= <ivstd/leakchecker.h>=0A!=20LeakChecker=20= AttributeValuechecker("AttributeValue");=0A=20=20#endif=0A=20=20=0A-=20=0A= =20=20= /*************************************************************************= ****/=0A=20=20=0A=20=20int*=20AttributeValue::_type_syms=20=3D=20nil;=0A=20= =20=0A=20=20AttributeValue::AttributeValue(ValueType=20valtype)=20{=0A=20= =20#ifdef=20LEAKCHECK=0A!=20=20=20=20=20AttributeValuechecker.create();=0A= =20=20#endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20= type(valtype);=0A---=2040,58=20----=0A=20=20#include=20<stdio.h>=0A=20=20= #include=20<string.h>=0A=20=20=0A=20=20#ifdef=20LEAKCHECK=0A!=20#include=20= <leakchecker.h>=0A!=20LeakChecker*=20AttributeValue::_leakchecker=20=3D=20= nil;=0A=20=20#endif=0A=20=20=0A=20=20= /*************************************************************************= ****/=0A=20=20=0A=20=20int*=20AttributeValue::_type_syms=20=3D=20nil;=0A=20= =20=0A=20=20AttributeValue::AttributeValue(ValueType=20valtype)=20{=0A=20= =20#ifdef=20LEAKCHECK=0A!=20=20=20=20=20if(!_leakchecker)=20_leakchecker=20= =3D=20new=20LeakChecker("AttributeValue");=0A!=20=20=20=20=20= _leakchecker->create();=0A=20=20#endif=0A=20=20=20=20=20=20clear();=0A=20= =20=20=20=20=20type(valtype);=0A***************=0A***=2057,63=20****=0A=20= =20=0A=20=20AttributeValue::AttributeValue(ValueType=20valtype,=20= attr_value=20value)=20{=0A=20=20#ifdef=20LEAKCHECK=0A!=20=20=20=20=20= AttributeValuechecker.create();=0A=20=20#endif=0A=20=20=20=20=20=20= clear();=0A=20=20=20=20=20=20type(valtype);=0A---=2060,67=20----=0A=20=20= =0A=20=20AttributeValue::AttributeValue(ValueType=20valtype,=20= attr_value=20value)=20{=0A=20=20#ifdef=20LEAKCHECK=0A!=20=20=20=20=20= if(!_leakchecker)=20_leakchecker=20=3D=20new=20= LeakChecker("AttributeValue");=0A!=20=20=20=20=20_leakchecker->create();=0A= =20=20#endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20= type(valtype);=0A***************=0A***=2067,80=20****=0A=20=20=0A=20=20= AttributeValue::AttributeValue(AttributeValue&=20sv)=20{=0A=20=20#ifdef=20= LEAKCHECK=0A!=20=20=20=20=20AttributeValuechecker.create();=0A=20=20= #endif=0A=20=20=20=20=20=20*this=20=3D=20sv;=0A=20=20}=0A=20=20=0A=20=20= AttributeValue::AttributeValue(AttributeValue*=20sv)=20{=0A=20=20#ifdef=20= LEAKCHECK=0A!=20=20=20=20=20AttributeValuechecker.create();=0A=20=20= #endif=0A=20=20=20=20=20=20*this=20=3D=20*sv;=0A=20=20=20=20=20=20= dup_as_needed();=0A---=2071,86=20----=0A=20=20=0A=20=20= AttributeValue::AttributeValue(AttributeValue&=20sv)=20{=0A=20=20#ifdef=20= LEAKCHECK=0A!=20=20=20=20=20if(!_leakchecker)=20_leakchecker=20=3D=20new=20= LeakChecker("AttributeValue");=0A!=20=20=20=20=20_leakchecker->create();=0A= =20=20#endif=0A=20=20=20=20=20=20*this=20=3D=20sv;=0A=20=20}=0A=20=20=0A=20= =20AttributeValue::AttributeValue(AttributeValue*=20sv)=20{=0A=20=20= #ifdef=20LEAKCHECK=0A!=20=20=20=20=20if(!_leakchecker)=20_leakchecker=20= =3D=20new=20LeakChecker("AttributeValue");=0A!=20=20=20=20=20= _leakchecker->create();=0A=20=20#endif=0A=20=20=20=20=20=20*this=20=3D=20= *sv;=0A=20=20=20=20=20=20dup_as_needed();=0A***************=0A***=20= 82,88=20****=0A=20=20=0A=20=20AttributeValue::AttributeValue()=20{=0A=20=20= #ifdef=20LEAKCHECK=0A!=20=20=20=20=20AttributeValuechecker.create();=0A=20= =20#endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20= type(UnknownType);=0A---=2088,95=20----=0A=20=20=0A=20=20= AttributeValue::AttributeValue()=20{=0A=20=20#ifdef=20LEAKCHECK=0A!=20=20= =20=20=20if(!_leakchecker)=20_leakchecker=20=3D=20new=20= LeakChecker("AttributeValue");=0A!=20=20=20=20=20_leakchecker->create();=0A= =20=20#endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20= type(UnknownType);=0A***************=0A***=2091,97=20****=0A=20=20=0A=20=20= AttributeValue::AttributeValue(unsigned=20char=20v)=20{=20=0A=20=20= #ifdef=20LEAKCHECK=0A!=20=20=20=20=20AttributeValuechecker.create();=0A=20= =20#endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20_type=20=3D=20= AttributeValue::UCharType;=0A---=2098,105=20----=0A=20=20=0A=20=20= AttributeValue::AttributeValue(unsigned=20char=20v)=20{=20=0A=20=20= #ifdef=20LEAKCHECK=0A!=20=20=20=20=20if(!_leakchecker)=20_leakchecker=20= =3D=20new=20LeakChecker("AttributeValue");=0A!=20=20=20=20=20= _leakchecker->create();=0A=20=20#endif=0A=20=20=20=20=20=20clear();=0A=20= =20=20=20=20=20_type=20=3D=20AttributeValue::UCharType;=0A= ***************=0A***=20100,106=20****=0A=20=20=0A=20=20= AttributeValue::AttributeValue(char=20v)=20{=20=0A=20=20#ifdef=20= LEAKCHECK=0A!=20=20=20=20=20AttributeValuechecker.create();=0A=20=20= #endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20_type=20=3D=20= AttributeValue::CharType;=0A---=20108,115=20----=0A=20=20=0A=20=20= AttributeValue::AttributeValue(char=20v)=20{=20=0A=20=20#ifdef=20= LEAKCHECK=0A!=20=20=20=20=20if(!_leakchecker)=20_leakchecker=20=3D=20new=20= LeakChecker("AttributeValue");=0A!=20=20=20=20=20_leakchecker->create();=0A= =20=20#endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20_type=20=3D=20= AttributeValue::CharType;=0A***************=0A***=20109,115=20****=0A=20=20= =0A=20=20AttributeValue::AttributeValue(unsigned=20short=20v)=20{=20=0A=20= =20#ifdef=20LEAKCHECK=0A!=20=20=20=20=20AttributeValuechecker.create();=0A= =20=20#endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20_type=20=3D=20= AttributeValue::UShortType;=0A---=20118,125=20----=0A=20=20=0A=20=20= AttributeValue::AttributeValue(unsigned=20short=20v)=20{=20=0A=20=20= #ifdef=20LEAKCHECK=0A!=20=20=20=20=20if(!_leakchecker)=20_leakchecker=20= =3D=20new=20LeakChecker("AttributeValue");=0A!=20=20=20=20=20= _leakchecker->create();=0A=20=20#endif=0A=20=20=20=20=20=20clear();=0A=20= =20=20=20=20=20_type=20=3D=20AttributeValue::UShortType;=0A= ***************=0A***=20118,124=20****=0A=20=20=0A=20=20= AttributeValue::AttributeValue(short=20v)=20{=20=0A=20=20#ifdef=20= LEAKCHECK=0A!=20=20=20=20=20AttributeValuechecker.create();=0A=20=20= #endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20_type=20=3D=20= AttributeValue::ShortType;=0A---=20128,135=20----=0A=20=20=0A=20=20= AttributeValue::AttributeValue(short=20v)=20{=20=0A=20=20#ifdef=20= LEAKCHECK=0A!=20=20=20=20=20if(!_leakchecker)=20_leakchecker=20=3D=20new=20= LeakChecker("AttributeValue");=0A!=20=20=20=20=20_leakchecker->create();=0A= =20=20#endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20_type=20=3D=20= AttributeValue::ShortType;=0A***************=0A***=20127,133=20****=0A=20= =20=0A=20=20AttributeValue::AttributeValue(unsigned=20int=20v,=20= ValueType=20type)=20{=20=0A=20=20#ifdef=20LEAKCHECK=0A!=20=20=20=20=20= AttributeValuechecker.create();=0A=20=20#endif=0A=20=20=20=20=20=20= clear();=0A=20=20=20=20=20=20_type=20=3D=20type;=0A---=20138,145=20----=0A= =20=20=0A=20=20AttributeValue::AttributeValue(unsigned=20int=20v,=20= ValueType=20type)=20{=20=0A=20=20#ifdef=20LEAKCHECK=0A!=20=20=20=20=20= if(!_leakchecker)=20_leakchecker=20=3D=20new=20= LeakChecker("AttributeValue");=0A!=20=20=20=20=20_leakchecker->create();=0A= =20=20#endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20_type=20=3D=20= type;=0A***************=0A***=20152,158=20****=0A=20=20=0A=20=20= AttributeValue::AttributeValue(unsigned=20int=20kv,=20unsigned=20int=20= kn,=20ValueType=20type)=20{=20=0A=20=20#ifdef=20LEAKCHECK=0A!=20=20=20=20= =20AttributeValuechecker.create();=0A=20=20#endif=0A=20=20=20=20=20=20= clear();=0A=20=20=20=20=20=20_type=20=3D=20type;=0A---=20164,171=20----=0A= =20=20=0A=20=20AttributeValue::AttributeValue(unsigned=20int=20kv,=20= unsigned=20int=20kn,=20ValueType=20type)=20{=20=0A=20=20#ifdef=20= LEAKCHECK=0A!=20=20=20=20=20if(!_leakchecker)=20_leakchecker=20=3D=20new=20= LeakChecker("AttributeValue");=0A!=20=20=20=20=20_leakchecker->create();=0A= =20=20#endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20_type=20=3D=20= type;=0A***************=0A***=20162,168=20****=0A=20=20=0A=20=20= AttributeValue::AttributeValue(int=20v,=20ValueType=20type)=20{=20=0A=20=20= #ifdef=20LEAKCHECK=0A!=20=20=20=20=20AttributeValuechecker.create();=0A=20= =20#endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20_type=20=3D=20= type;=0A---=20175,182=20----=0A=20=20=0A=20=20= AttributeValue::AttributeValue(int=20v,=20ValueType=20type)=20{=20=0A=20=20= #ifdef=20LEAKCHECK=0A!=20=20=20=20=20if(!_leakchecker)=20_leakchecker=20= =3D=20new=20LeakChecker("AttributeValue");=0A!=20=20=20=20=20= _leakchecker->create();=0A=20=20#endif=0A=20=20=20=20=20=20clear();=0A=20= =20=20=20=20=20_type=20=3D=20type;=0A***************=0A***=20187,193=20= ****=0A=20=20=0A=20=20AttributeValue::AttributeValue(unsigned=20long=20= v)=20{=20=0A=20=20#ifdef=20LEAKCHECK=0A!=20=20=20=20=20= AttributeValuechecker.create();=0A=20=20#endif=0A=20=20=20=20=20=20= clear();=0A=20=20=20=20=20=20_type=20=3D=20AttributeValue::ULongType;=0A= ---=20201,208=20----=0A=20=20=0A=20=20= AttributeValue::AttributeValue(unsigned=20long=20v)=20{=20=0A=20=20= #ifdef=20LEAKCHECK=0A!=20=20=20=20=20if(!_leakchecker)=20_leakchecker=20= =3D=20new=20LeakChecker("AttributeValue");=0A!=20=20=20=20=20= _leakchecker->create();=0A=20=20#endif=0A=20=20=20=20=20=20clear();=0A=20= =20=20=20=20=20_type=20=3D=20AttributeValue::ULongType;=0A= ***************=0A***=20196,202=20****=0A=20=20=0A=20=20= AttributeValue::AttributeValue(long=20v)=20{=20=0A=20=20#ifdef=20= LEAKCHECK=0A!=20=20=20=20=20AttributeValuechecker.create();=0A=20=20= #endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20_type=20=3D=20= AttributeValue::LongType;=0A---=20211,218=20----=0A=20=20=0A=20=20= AttributeValue::AttributeValue(long=20v)=20{=20=0A=20=20#ifdef=20= LEAKCHECK=0A!=20=20=20=20=20if(!_leakchecker)=20_leakchecker=20=3D=20new=20= LeakChecker("AttributeValue");=0A!=20=20=20=20=20_leakchecker->create();=0A= =20=20#endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20_type=20=3D=20= AttributeValue::LongType;=0A***************=0A***=20205,211=20****=0A=20=20= =0A=20=20AttributeValue::AttributeValue(float=20v)=20{=20=0A=20=20#ifdef=20= LEAKCHECK=0A!=20=20=20=20=20AttributeValuechecker.create();=0A=20=20= #endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20_type=20=3D=20= AttributeValue::FloatType;=0A---=20221,228=20----=0A=20=20=0A=20=20= AttributeValue::AttributeValue(float=20v)=20{=20=0A=20=20#ifdef=20= LEAKCHECK=0A!=20=20=20=20=20if(!_leakchecker)=20_leakchecker=20=3D=20new=20= LeakChecker("AttributeValue");=0A!=20=20=20=20=20_leakchecker->create();=0A= =20=20#endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20_type=20=3D=20= AttributeValue::FloatType;=0A***************=0A***=20214,220=20****=0A=20= =20=0A=20=20AttributeValue::AttributeValue(double=20v)=20{=20=0A=20=20= #ifdef=20LEAKCHECK=0A!=20=20=20=20=20AttributeValuechecker.create();=0A=20= =20#endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20_type=20=3D=20= AttributeValue::DoubleType;=0A---=20231,238=20----=0A=20=20=0A=20=20= AttributeValue::AttributeValue(double=20v)=20{=20=0A=20=20#ifdef=20= LEAKCHECK=0A!=20=20=20=20=20if(!_leakchecker)=20_leakchecker=20=3D=20new=20= LeakChecker("AttributeValue");=0A!=20=20=20=20=20_leakchecker->create();=0A= =20=20#endif=0A=20=20=20=20=20=20clear();=0A=20=20=20=20=20=20_type=20=3D=20= AttributeValue::DoubleType;=0A***************=0A***=20223,229=20****=0A=20= =20=0A=20=20AttributeValue::AttributeValue(int=20classid,=20void*=20ptr)=20= {=20=0A=20=20#ifdef=20LEAKCHECK=0A!=20=20=20=20=20= AttributeValuechecker.create();=0A=20=20#endif=0A=20=20=20=20=20=20_type=20= =3D=20AttributeValue::ObjectType;=0A=20=20=20=20=20=20_v.objval.ptr=20=3D=20= ptr;=0A---=20241,248=20----=0A=20=20=0A=20=20= AttributeValue::AttributeValue(int=20classid,=20void*=20ptr)=20{=20=0A=20= =20#ifdef=20LEAKCHECK=0A!=20=20=20=20=20if(!_leakchecker)=20_leakchecker=20= =3D=20new=20LeakChecker("AttributeValue");=0A!=20=20=20=20=20= _leakchecker->create();=0A=20=20#endif=0A=20=20=20=20=20=20_type=20=3D=20= AttributeValue::ObjectType;=0A=20=20=20=20=20=20_v.objval.ptr=20=3D=20= ptr;=0A***************=0A***=20231,239=20****=0A=20=20=20=20=20=20= _object_compview=20=3D=20false;=0A=20=20}=0A=20=20=0A=20=20= AttributeValue::AttributeValue(AttributeValueList*=20ptr)=20{=20=0A=20=20= #ifdef=20LEAKCHECK=0A!=20=20=20=20=20AttributeValuechecker.create();=0A=20= =20#endif=0A=20=20=20=20=20=20_type=20=3D=20AttributeValue::ArrayType;=0A= =20=20=20=20=20=20_v.arrayval.ptr=20=3D=20ptr;=0A---=20250,271=20----=0A=20= =20=20=20=20=20_object_compview=20=3D=20false;=0A=20=20}=0A=20=20=0A+=20= AttributeValue::AttributeValue(ComponentView*=20view,=20int=20compid)=20= {=20=0A+=20#ifdef=20LEAKCHECK=0A+=20=20=20=20=20if(!_leakchecker)=20= _leakchecker=20=3D=20new=20LeakChecker("AttributeValue");=0A+=20=20=20=20= =20_leakchecker->create();=0A+=20#endif=0A+=20=20=20=20=20_type=20=3D=20= AttributeValue::ObjectType;=0A+=20=20=20=20=20_v.objval.ptr=20=3D=20= view;=0A+=20=20=20=20=20_v.objval.type=20=3D=20compid;=0A+=20=20=20=20=20= _object_compview=20=3D=20true;=0A+=20=20=20=20=20Resource::ref(view);=0A= +=20}=0A+=20=0A=20=20AttributeValue::AttributeValue(AttributeValueList*=20= ptr)=20{=20=0A=20=20#ifdef=20LEAKCHECK=0A!=20=20=20=20=20= if(!_leakchecker)=20_leakchecker=20=3D=20new=20= LeakChecker("AttributeValue");=0A!=20=20=20=20=20_leakchecker->create();=0A= =20=20#endif=0A=20=20=20=20=20=20_type=20=3D=20= AttributeValue::ArrayType;=0A=20=20=20=20=20=20_v.arrayval.ptr=20=3D=20= ptr;=0A***************=0A***=20243,249=20****=0A=20=20=0A=20=20= AttributeValue::AttributeValue(void*=20comfuncptr,=20AttributeValueList*=20= vallist)=20{=0A=20=20#ifdef=20LEAKCHECK=0A!=20=20=20=20=20= AttributeValuechecker.create();=0A=20=20#endif=0A=20=20=20=20=20=20_type=20= =3D=20AttributeValue::StreamType;=0A=20=20=20=20=20=20= _v.streamval.funcptr=20=3D=20comfuncptr;=0A---=20275,282=20----=0A=20=20=0A= =20=20AttributeValue::AttributeValue(void*=20comfuncptr,=20= AttributeValueList*=20vallist)=20{=0A=20=20#ifdef=20LEAKCHECK=0A!=20=20=20= =20=20if(!_leakchecker)=20_leakchecker=20=3D=20new=20= LeakChecker("AttributeValue");=0A!=20=20=20=20=20_leakchecker->create();=0A= =20=20#endif=0A=20=20=20=20=20=20_type=20=3D=20= AttributeValue::StreamType;=0A=20=20=20=20=20=20_v.streamval.funcptr=20=3D= =20comfuncptr;=0A***************=0A***=20253,259=20****=0A=20=20=0A=20=20= AttributeValue::AttributeValue(const=20char*=20string)=20{=20=0A=20=20= #ifdef=20LEAKCHECK=0A!=20=20=20=20=20AttributeValuechecker.create();=0A=20= =20#endif=0A=20=20=20=20=20=20_type=20=3D=20AttributeValue::StringType;=0A= =20=20=20=20=20=20_v.dfintval=20=3D=20symbol_add((char*)string);=0A---=20= 286,293=20----=0A=20=20=0A=20=20AttributeValue::AttributeValue(const=20= char*=20string)=20{=20=0A=20=20#ifdef=20LEAKCHECK=0A!=20=20=20=20=20= if(!_leakchecker)=20_leakchecker=20=3D=20new=20= LeakChecker("AttributeValue");=0A!=20=20=20=20=20_leakchecker->create();=0A= =20=20#endif=0A=20=20=20=20=20=20_type=20=3D=20= AttributeValue::StringType;=0A=20=20=20=20=20=20_v.dfintval=20=3D=20= symbol_add((char*)string);=0A***************=0A***=20261,267=20****=0A=20= =20=0A=20=20AttributeValue::~AttributeValue()=20{=0A=20=20#ifdef=20= LEAKCHECK=0A!=20=20=20=20=20AttributeValuechecker.destroy();=0A=20=20= #endif=0A=20=20#if=200=20=20//=20disable=20symbol=20reference=20counting=0A= =20=20=20=20=20=20if=20(_type=20=3D=3D=20StringType=20||=20_type=20=3D=3D=20= SymbolType)=20=0A---=20295,301=20----=0A=20=20=0A=20=20= AttributeValue::~AttributeValue()=20{=0A=20=20#ifdef=20LEAKCHECK=0A!=20=20= =20=20=20_leakchecker->destroy();=0A=20=20#endif=0A=20=20#if=200=20=20//=20= disable=20symbol=20reference=20counting=0A=20=20=20=20=20=20if=20(_type=20= =3D=3D=20StringType=20||=20_type=20=3D=3D=20SymbolType)=20=0A= ***************=0A***=201131,1136=20****=0A---=201165,1174=20----=0A=20=20= =20=20=20=20=20=20Resource::ref(_v.arrayval.ptr);=0A=20=20=20=20=20=20= else=20if=20(_type=20=3D=3D=20AttributeValue::StreamType)=0A=20=20=20=20=20= =20=20=20Resource::ref(_v.streamval.listptr);=0A+=20#ifdef=20= RESOURCE_COMPVIEW=0A+=20=20=20=20=20else=20if=20(_type=20=3D=3D=20= AttributeValue::ObjectType=20&&=20object_compview())=0A+=20=20=20=20=20=20= =20Resource::ref((ComponentView*)_v.objval.ptr);=0A+=20#endif=0A=20=20}=0A= =20=20=0A=20=20void=20AttributeValue::dup_as_needed()=20{=0A= ***************=0A***=201144,1150=20****=0A---=201182,1200=20----=0A=20=20= =20=20=20=20_v.streamval.listptr=20=3D=20new=20AttributeValueList(avl);=0A= =20=20=20=20=20=20Resource::ref(_v.streamval.listptr);=0A=20=20=20=20=20=20= Resource::unref(avl);=0A+=20=20=20}=20=0A+=20#ifdef=20RESOURCE_COMPVIEW=0A= +=20=20=20else=20if=20(_type=20=3D=3D=20AttributeValue::ObjectType=20&&=20= object_compview())=20{=0A+=20=20=20=20=20ComponentView*=20oldview=20=3D=20= (ComponentView*)_v.objval.ptr;=0A+=20=20=20=20=20Component*=20subject=20= =3D=20oldview->GetSubject();=0A+=20=20=20=20=20ComponentView*=20newview=20= =3D=20oldview->Duplicate();=0A+=20=20=20=20=20= newview->SetSubject(subject);=0A+=20=20=20=20=20= subject->Attach(newview);=0A+=20=20=20=20=20_v.objval.ptr=20=3D=20= newview;=0A+=20=20=20=20=20Resource::ref(newview);=0A+=20=20=20=20=20= Resource::unref(oldview);=0A=20=20=20=20}=0A+=20#endif=0A=20=20}=0A=20=20= =0A=20=20void=20AttributeValue::unref_as_needed()=20{=0A***************=0A= ***=201157,1162=20****=0A---=201207,1216=20----=0A=20=20=20=20}=0A=20=20=20= =20else=20if=20(_type=20=3D=3D=20AttributeValue::StreamType)=0A=20=20=20=20= =20=20=20=20Resource::unref(_v.streamval.listptr);=0A+=20#ifdef=20= RESOURCE_COMPVIEW=0A+=20=20=20else=20if=20(_type=20=3D=3D=20= AttributeValue::ObjectType=20&&=20object_compview())=20=0A+=20=20=20=20=20= =20=20=20Resource::unref((ComponentView*)_v.objval.ptr);=0A+=20#endif=0A=20= =20}=0A=20=20=0A=20=20boolean=20AttributeValue::same_list(const=20= AttributeValue&=20av)=20{=0A***************=0A***=201164,1169=20****=0A= ---=201218,1227=20----=0A=20=20=20=20=20=20return=20_v.arrayval.ptr=20=3D=3D= =20av._v.arrayval.ptr;=0A=20=20=20=20else=20if=20(_type=20=3D=3D=20= AttributeValue::StreamType)=0A=20=20=20=20=20=20return=20= _v.streamval.listptr=20=3D=3D=20av._v.streamval.listptr;=0A+=20#ifdef=20= RESOURCE_COMPVIEW=0A+=20=20=20else=20if=20(_type=20=3D=3D=20= AttributeValue::ObjectType=20&&=20object_compview())=0A+=20=20=20=20=20= return=20_v.objval.ptr=20=3D=3D=20av._v.objval.ptr;=0A+=20#endif=0A=20=20= =20=20else=0A=20=20=20=20=20=20return=20false;=0A=20=20}=0A= ***************=0A***=201207,1209=20****=0A---=201265,1274=20----=0A=20=20= =20=20if=20(this->class_symid()=20=3D=3D=20class_symid)=20return=20true;=0A= =20=20=20=20return=20false;=0A=20=20}=0A+=20=0A+=20#if=200=0A+=20void=20= AttributeValue::object_compview(boolean=20flag)=20{=20=0A+=20=20=20= _object_compview=20=3D=20flag;=20=0A+=20=20=20if(flag)=20= Resource::ref((ComponentView*)_v.objval.ptr);=0A+=20}=0A+=20#endif=0A= Index:=20Attribute/attrvalue.h=0Adiff=20-c=20Attribute/attrvalue.h:1.2=20= Attribute/attrvalue.h:1.3=0A***=20Attribute/attrvalue.h:1.2=09Sun=20Sep=20= 23=2009:11:26=202007=0A---=20src/Attribute/attrvalue.h=09Wed=20Aug=2026=20= 09:21:32=202009=0A***************=0A***=2026,34=20****=0A---=2026,42=20= ----=0A=20=20#if=20!defined(_attrvalue_h)=0A=20=20#define=20_attrvalue_h=0A= =20=20=0A+=20#define=20RESOURCE_COMPVIEW=0A+=20=0A+=20#define=20= LEAKCHECK=0A+=20#ifdef=20LEAKCHECK=0A+=20class=20LeakChecker;=0A+=20= #endif=0A+=20=0A=20=20#include=20<stdlib.h>=0A=20=20#include=20= <OS/enter-scope.h>=0A=20=20#include=20<Attribute/classid.h>=0A+=20= #include=20<Unidraw/Components/compview.h>=0A=20=20=0A=20=20extern=20"C"=20= {=0A=20=20=20=20=20=20int=20symbol_add(char*);=0A***************=0A***=20= 38,43=20****=0A---=2046,52=20----=0A=20=20}=0A=20=20=0A=20=20class=20= AttributeValueList;=0A+=20class=20ComponentView;=0A=20=20=0A=20=20= #include=20<iosfwd>=0A=20=20=0A***************=0A***=20153,158=20****=0A= ---=20162,169=20----=0A=20=20=20=20=20=20//=20StreamType=20constructor.=0A= =20=20=20=20=20=20AttributeValue(const=20char*=20val);=0A=20=20=20=20=20=20= //=20StringType=20constructor.=0A+=20=20=20=20=20= AttributeValue(ComponentView*=20view,=20int=20compid);=0A+=20=20=20=20=20= //=20ComponentView=20constructor.=0A=20=20=0A=20=20=20=20=20=20virtual=20= ~AttributeValue();=0A=20=20=20=20=20=20//=20set=20to=20UnknownType=20and=20= unref=20pointer=20if=20ArrayType/ListType=20or=20StreamType.=0A= ***************=0A***=20243,250=20****=0A=20=20=0A=20=20=20=20=20=20= boolean=20object_compview()=20{=20return=20is_object()=20&&=20= _object_compview;=20}=0A=20=20=20=20=20=20//=20true=20if=20object=20is=20= wrapped=20with=20a=20ComponentView=0A!=20=20=20=20=20void=20= object_compview(boolean=20flag)=20{=20_object_compview=20=3D=20flag;=20}=0A= =20=20=20=20=20=20//=20true=20if=20object=20is=20wrapped=20with=20a=20= ComponentView=0A=20=20=0A=20=20=20=20=20=20int=20stream_mode();=0A=20=20=20= =20=20=20//=200=20=3D=20disabled,=20negative=20=3D=20internal,=20= positive=20=3D=20external=0A---=20254,263=20----=0A=20=20=0A=20=20=20=20=20= =20boolean=20object_compview()=20{=20return=20is_object()=20&&=20= _object_compview;=20}=0A=20=20=20=20=20=20//=20true=20if=20object=20is=20= wrapped=20with=20a=20ComponentView=0A!=20#if=200=0A!=20=20=20=20=20void=20= object_compview(boolean=20flag);=0A=20=20=20=20=20=20//=20true=20if=20= object=20is=20wrapped=20with=20a=20ComponentView=0A+=20#endif=0A=20=20=0A= =20=20=20=20=20=20int=20stream_mode();=0A=20=20=20=20=20=20//=200=20=3D=20= disabled,=20negative=20=3D=20internal,=20positive=20=3D=20external=0A= ***************=0A***=20383,388=20****=0A---=20396,405=20----=0A=20=20=20= =20=20=20};=0A=20=20=20=20=20=20static=20int*=20_type_syms;=0A=20=20=0A+=20= #ifdef=20LEAKCHECK=0A+=20=20public:=0A+=20=20=20=20=20static=20= LeakChecker*=20_leakchecker;=0A+=20#endif=0A=20=20};=0A=20=20=0A=20=20= //:=20for=20quick=20casting=20in=20debugger=0AIndex:=20= Attribute/paramlist.c=0Adiff=20-c=20Attribute/paramlist.c:1.3=20= Attribute/paramlist.c:1.4=0A***=20Attribute/paramlist.c:1.3=09Fri=20May=20= 16=2010:47:36=202008=0A---=20src/Attribute/paramlist.c=09Wed=20Aug=2026=20= 09:21:32=202009=0A***************=0A***=2049,55=20****=0A=20=20static=20= const=20int=20BUFSIZE=20=3D=2010000;=0A=20=20static=20char=20= textbuf[BUFSIZE];=0A=20=20=0A!=20static=20void=20GetLine=20(=0A=20=20=20=20= =20=20const=20char*=20s,=20int=20size,=20int=20begin,=20int&=20end,=20= int&=20lineSize,=20int&=20nextBegin=0A=20=20)=20{=0A=20=20=20=20=20=20= int=20i=20=3D=20begin;=0A---=2049,55=20----=0A=20=20static=20const=20int=20= BUFSIZE=20=3D=2010000;=0A=20=20static=20char=20textbuf[BUFSIZE];=0A=20=20= =0A!=20static=20void=20Get_Line=20(=0A=20=20=20=20=20=20const=20char*=20= s,=20int=20size,=20int=20begin,=20int&=20end,=20int&=20lineSize,=20int&=20= nextBegin=0A=20=20)=20{=0A=20=20=20=20=20=20int=20i=20=3D=20begin;=0A= ***************=0A***=20857,863=20****=0A=20=20=09out=20<<=20"\"\"";=0A=20= =20=20=20=20=20else=20{=0A=20=20=09for=20(beg=20=3D=200;=20beg=20<=20= len;=20)=20{=0A!=20=09=20=20=20=20GetLine(text,=20len,=20beg,=20end,=20= lineSize,=20nextBeg);=0A=20=20=09=20=20=20=20const=20char*=20string=20=3D=20= filter(&text[beg],=20end=20-=20beg=20+=201);=0A=20=20=09=20=20=20=20out=20= <<=20"\""=20<<=20string=20<<=20"\"";=0A=20=20=09=20=20=20=20beg=20=3D=20= nextBeg;=0A---=20857,863=20----=0A=20=20=09out=20<<=20"\"\"";=0A=20=20=20= =20=20=20else=20{=0A=20=20=09for=20(beg=20=3D=200;=20beg=20<=20len;=20)=20= {=0A!=20=09=20=20=20=20Get_Line(text,=20len,=20beg,=20end,=20lineSize,=20= nextBeg);=0A=20=20=09=20=20=20=20const=20char*=20string=20=3D=20= filter(&text[beg],=20end=20-=20beg=20+=201);=0A=20=20=09=20=20=20=20out=20= <<=20"\""=20<<=20string=20<<=20"\"";=0A=20=20=09=20=20=20=20beg=20=3D=20= nextBeg;=0AIndex:=20ComTerp/comfunc.c=0Adiff=20-c=20= ComTerp/comfunc.c:1.5=20ComTerp/comfunc.c:1.6=0A***=20= ComTerp/comfunc.c:1.5=09Fri=20Feb=2027=2007:00:04=202009=0A---=20= src/ComTerp/comfunc.c=09Wed=20Aug=2026=2009:21:33=202009=0A= ***************=0A***=2032,37=20****=0A---=2032,38=20----=0A=20=20= #define=20TITLE=20"ComFunc"=0A=20=20=0A=20=20//#define=20LEAKCHECK=0A+=20= #undef=20LEAKCHECK=0A=20=20=0A=20=20#ifdef=20LEAKCHECK=0A=20=20#include=20= <ivstd/leakchecker.h>=0AIndex:=20ComTerp/comterp.c=0Adiff=20-c=20= ComTerp/comterp.c:1.15=20ComTerp/comterp.c:1.16=0A***=20= ComTerp/comterp.c:1.15=09Mon=20May=2018=2016:42:52=202009=0A---=20= src/ComTerp/comterp.c=09Wed=20Aug=2026=2009:21:33=202009=0A= ***************=0A***=2076,86=20****=0A=20=20#include=20<fstream.h>=0A=20= =20#endif=0A=20=20=0A-=20//=20#define=20LEAKCHECK=0A-=20=0A=20=20#ifdef=20= LEAKCHECK=0A!=20#include=20<ivstd/leakchecker.h>=0A!=20extern=20= LeakChecker=20AttributeValuechecker;=0A=20=20#endif=0A=20=20=0A=20=20= #define=20TITLE=20"ComTerp"=0A---=2076,83=20----=0A=20=20#include=20= <fstream.h>=0A=20=20#endif=0A=20=20=0A=20=20#ifdef=20LEAKCHECK=0A!=20= #include=20<leakchecker.h>=0A=20=20#endif=0A=20=20=0A=20=20#define=20= TITLE=20"ComTerp"=0A***************=0A***=20835,841=20****=0A=20=20=20=20= =20=20=20=20=20=20ComValue&=20stacktop=20=3D=20_stack[_stack_top--];=0A=20= =20=09stacktop.AttributeValue::~AttributeValue();=0A=20=20=20=20=20=20=20= =20=20=20#ifdef=20LEAKCHECK=20//=20destructor=20called=20where=20= constructor=20never=20called=0A!=20=09AttributeValuechecker.create();=0A=20= =20=20=20=20=20=20=20=20=20#endif=0A=20=20=20=20=20=20}=0A=20=20}=0A---=20= 832,838=20----=0A=20=20=20=20=20=20=20=20=20=20ComValue&=20stacktop=20=3D=20= _stack[_stack_top--];=0A=20=20=09= stacktop.AttributeValue::~AttributeValue();=0A=20=20=20=20=20=20=20=20=20= =20#ifdef=20LEAKCHECK=20//=20destructor=20called=20where=20constructor=20= never=20called=0A!=20=09AttributeValue::_leakchecker->create();=0A=20=20=20= =20=20=20=20=20=20=20#endif=0A=20=20=20=20=20=20}=0A=20=20}=0A= ***************=0A***=20846,852=20****=0A=20=20=20=20=20=20ComValue=20= topval(stacktop);=0A=20=20=20=20=20=20= stacktop.AttributeValue::~AttributeValue();=0A=20=20=20=20=20=20#ifdef=20= LEAKCHECK=20=20//=20destructor=20called=20where=20constructor=20never=20= called=0A!=20=20=20=20=20AttributeValuechecker.create();=0A=20=20=20=20=20= =20#endif=0A=20=20=20=20=20=20if=20(lookupsym)=0A=20=20=20=20=20=20=20=20= return=20lookup_symval(topval);=0A---=20843,849=20----=0A=20=20=20=20=20=20= ComValue=20topval(stacktop);=0A=20=20=20=20=20=20= stacktop.AttributeValue::~AttributeValue();=0A=20=20=20=20=20=20#ifdef=20= LEAKCHECK=20=20//=20destructor=20called=20where=20constructor=20never=20= called=0A!=20=20=20=20=20AttributeValue::_leakchecker->create();=0A=20=20= =20=20=20=20#endif=0A=20=20=20=20=20=20if=20(lookupsym)=0A=20=20=20=20=20= =20=20=20return=20lookup_symval(topval);=0AIndex:=20ComTerp/comvalue.c=0A= diff=20-c=20ComTerp/comvalue.c:1.4=20ComTerp/comvalue.c:1.5=0A***=20= ComTerp/comvalue.c:1.4=09Sat=20Oct=2025=2010:24:59=202008=0A---=20= src/ComTerp/comvalue.c=09Wed=20Aug=2026=2009:21:33=202009=0A= ***************=0A***=2091,96=20****=0A---=2091,97=20----=0A=20=20= ComValue::ComValue(void*=20funcptr,=20AttributeValueList*=20listptr)=20:=20= AttributeValue(funcptr,=20listptr)=20{zero_vals();}=0A=20=20= ComValue::ComValue(const=20char*=20string)=20:=20AttributeValue(string)=20= {zero_vals();}=0A=20=20ComValue::ComValue(ComFunc*=20func)=20:=20= AttributeValue(ComFunc::class_symid(),=20func)=20{zero_vals();=20= type(ComValue::CommandType);=20command_symid(func->funcid());=20}=0A+=20= ComValue::ComValue(ComponentView*=20view,=20int=20compid)=20:=20= AttributeValue(view,=20compid)=20{zero_vals();}=0A=20=20=0A=20=20= ComValue::~ComValue()=20{=0A=20=20}=0A***************=0A***=20286,293=20= ****=0A---=20287,304=20----=0A=20=20=09=20=20=20=20ALIterator=20i;=0A=20=20= =09=20=20=20=20AttributeValueList*=20avl=20=3D=20svp->array_val();=0A=20=20= =09=20=20=20=20avl->First(i);=0A+=20=0A+=20=0A+=20=0A=20=20=09=20=20=20=20= out=20<<=20"{";=0A+=20=0A+=20=0A+=20=0A+=20=0A=20=20=09=20=20=20=20while=20= (!avl->Done(i))=20{=0A+=20=0A+=20=0A+=20=0A=20=20=09=20=20=20=20=20=20= ComValue=20val(*avl->GetAttrVal(i));=0A=20=20=09=20=20=20=20=20=20out=20= <<=20val;=0A=20=20=09=20=20=20=20=20=20avl->Next(i);=0AIndex:=20= ComTerp/comvalue.h=0Adiff=20-c=20ComTerp/comvalue.h:1.2=20= ComTerp/comvalue.h:1.3=0A***=20ComTerp/comvalue.h:1.2=09Sun=20Sep=2023=20= 09:11:27=202007=0A---=20src/ComTerp/comvalue.h=09Wed=20Aug=2026=20= 09:21:33=202009=0A***************=0A***=2032,37=20****=0A---=2032,38=20= ----=0A=20=20=0A=20=20#include=20<ComTerp/_comterp.h>=0A=20=20#include=20= <Attribute/attrvalue.h>=0A+=20#include=20<Unidraw/Components/compview.h>=0A= =20=20=0A=20=20class=20ComFunc;=0A=20=20class=20ComTerp;=0A= ***************=0A***=2089,94=20****=0A---=2090,97=20----=0A=20=20=20=20=20= =20//=20StringType=20constructor.=0A=20=20=20=20=20=20ComValue(ComFunc*=20= func);=0A=20=20=20=20=20=20//=20CommandType=20constructor.=0A+=20=20=20=20= =20ComValue(ComponentView*=20view,=20int=20compid);=0A+=20=20=20=20=20//=20= ComponentView=20constructor.=0A=20=20=0A=20=20=20=20=20=20void=20init();=0A= =20=20=20=20=20=20//=20initialize=20member=20variables.=0AIndex:=20= ComTerp/dotfunc.c=0Adiff=20-c=20ComTerp/dotfunc.c:1.2=20= ComTerp/dotfunc.c:1.3=0A***=20ComTerp/dotfunc.c:1.2=09Fri=20May=2016=20= 10:47:37=202008=0A---=20src/ComTerp/dotfunc.c=09Wed=20Aug=2026=20= 09:21:33=202009=0A***************=0A***=20114,120=20****=0A=20=20}=0A=20=20= =0A=20=20void=20DotNameFunc::execute()=20{=0A!=20=20=20=20=20ComValue=20= dotted_pair(stack_arg(0));=0A=20=20=20=20=20=20reset_stack();=0A=20=20=20= =20=20=20if=20(dotted_pair.class_symid()=20!=3D=20= Attribute::class_symid())=20return;=0A=20=20=20=20=20=20Attribute=20= *attr=20=3D=20(Attribute*)dotted_pair.obj_val();=0A---=20114,120=20----=0A= =20=20}=0A=20=20=0A=20=20void=20DotNameFunc::execute()=20{=0A!=20=20=20=20= =20ComValue=20dotted_pair(stack_arg(0,=20true));=0A=20=20=20=20=20=20= reset_stack();=0A=20=20=20=20=20=20if=20(dotted_pair.class_symid()=20!=3D=20= Attribute::class_symid())=20return;=0A=20=20=20=20=20=20Attribute=20= *attr=20=3D=20(Attribute*)dotted_pair.obj_val();=0AIndex:=20= ComTerp/numfunc.c=0Adiff=20-c=20ComTerp/numfunc.c:1.3=20= ComTerp/numfunc.c:1.4=0A***=20ComTerp/numfunc.c:1.3=09Sat=20Nov=20=208=20= 10:10:48=202008=0A---=20src/ComTerp/numfunc.c=09Wed=20Aug=2026=20= 09:21:33=202009=0A***************=0A***=2049,55=20****=0A=20=20=20=20=20=20= }=0A=20=20#endif=0A=20=20=0A!=20=20=20=20=20boolean=20op1bigger=20=3D=20= op1.type()=20>=20op2.type();=0A=20=20=20=20=20=20ComValue*=20greater=20=3D= =20op1bigger=20?=20&op1=20:=20&op2;=0A=20=20=20=20=20=20ComValue*=20= lesser=20=3D=20=20op1bigger=20?=20&op2=20:=20&op1;=0A=20=20=0A---=20= 49,55=20----=0A=20=20=20=20=20=20}=0A=20=20#endif=0A=20=20=0A!=20=20=20=20= =20boolean=20op1bigger=20=3D=20op1.type()!=3DComValue::BooleanType=20?=20= op1.type()=20>=20op2.type()=20:=20false;=0A=20=20=20=20=20=20ComValue*=20= greater=20=3D=20op1bigger=20?=20&op1=20:=20&op2;=0A=20=20=20=20=20=20= ComValue*=20lesser=20=3D=20=20op1bigger=20?=20&op2=20:=20&op1;=0A=20=20=0A= ***************=0A***=2075,80=20****=0A---=2075,84=20----=0A=20=20=09= break;=0A=20=20=20=20=20=20}=0A=20=20=20=20=20=20switch=20= (lesser->type())=20{=0A+=20=20=20=20=20case=20ComValue::BooleanType:=0A+=20= =09lesser->int_ref()=20=3D=20=20lesser->boolean_val();=0A+=20=09= lesser->type(ComValue::IntType);=0A+=20=09break;=0A=20=20=20=20=20=20= case=20ComValue::CharType:=0A=20=20=09lesser->int_ref()=20=3D=20=20= lesser->char_val();=0A=20=20=09lesser->type(ComValue::IntType);=0AIndex:=20= ComTerp/statfunc.c=0Adiff=20-c=20ComTerp/statfunc.c:1.1=20= ComTerp/statfunc.c:1.2=0A***=20ComTerp/statfunc.c:1.1=09Wed=20Aug=2029=20= 10:37:49=202007=0A---=20src/ComTerp/statfunc.c=09Wed=20Aug=2026=20= 09:21:33=202009=0A***************=0A***=2086,91=20****=0A---=2086,92=20= ----=0A=20=20=20=20=20=20MpyFunc=20mpyfunc(comterp());=0A=20=20=20=20=20=20= ComValue=20sqrsumval(ComValue::zeroval());=0A=20=20=20=20=20=20ComValue=20= sumval(ComValue::zeroval());=0A+=20=20=20=20=20ComValue=20mnsquaresval;=0A= =20=20=20=20=20=20Iterator=20it;=0A=20=20=20=20=20=20int=20count=20=3D=20= 0;=0A=20=20=20=20=20=20for=20(avl->First(it);=20!avl->Done(it);=20= avl->Next(it))=20{=0A***************=0A***=20106,115=20****=0A=20=20=20=20= =20=20=20=20sumval=20=3D=20comterp()->pop_stack();=0A=20=20=20=20=20=20}=0A= =20=20=0A!=20=20=20=20=20/*=20compute=20mean=20squared=20*/=0A=20=20=20=20= =20=20DivFunc=20divfunc(comterp());=0A=20=20=20=20=20=20= push_stack(sumval);=0A-=20=20=20=20=20ComValue=20countval(count,=20= ComValue::IntType);=0A=20=20=20=20=20=20push_stack(countval);=0A=20=20=20= =20=20=20divfunc.exec(2,0);=0A=20=20=20=20=20=20ComValue=20= meanval(comterp()->pop_stack());=0A---=20107,122=20----=0A=20=20=20=20=20= =20=20=20sumval=20=3D=20comterp()->pop_stack();=0A=20=20=20=20=20=20}=0A=20= =20=0A!=20=20=20=20=20/*=20compute=20mean=20of=20squares=20*/=0A=20=20=20= =20=20=20DivFunc=20divfunc(comterp());=0A+=20=20=20=20=20= push_stack(sqrsumval);=0A+=20=20=20=20=20ComValue=20= countval((float)count);=0A+=20=20=20=20=20push_stack(countval);=0A+=20=20= =20=20=20divfunc.exec(2,0);=0A+=20=20=20=20=20mnsquaresval=20=3D=20= comterp()->pop_stack();=0A+=20=0A+=20=20=20=20=20/*=20compute=20mean=20= squared=20*/=0A=20=20=20=20=20=20push_stack(sumval);=0A=20=20=20=20=20=20= push_stack(countval);=0A=20=20=20=20=20=20divfunc.exec(2,0);=0A=20=20=20=20= =20=20ComValue=20meanval(comterp()->pop_stack());=0A***************=0A= ***=20120,126=20****=0A=20=20=0A=20=20=20=20=20=20/*=20subract=20mean=20= squared=20from=20sum=20of=20squares=20to=20get=20variance=20*/=0A=20=20=20= =20=20=20SubFunc=20subfunc(comterp());=0A!=20=20=20=20=20= push_stack(sqrsumval);=0A=20=20=20=20=20=20push_stack(mnsquaredval);=0A=20= =20=20=20=20=20subfunc.exec(2,0);=0A=20=20=0A---=20127,133=20----=0A=20=20= =0A=20=20=20=20=20=20/*=20subract=20mean=20squared=20from=20sum=20of=20= squares=20to=20get=20variance=20*/=0A=20=20=20=20=20=20SubFunc=20= subfunc(comterp());=0A!=20=20=20=20=20push_stack(mnsquaresval);=0A=20=20=20= =20=20=20push_stack(mnsquaredval);=0A=20=20=20=20=20=20= subfunc.exec(2,0);=0A=20=20=0AIndex:=20ComUnidraw/comeditor.c=0Adiff=20= -c=20ComUnidraw/comeditor.c:1.4=20ComUnidraw/comeditor.c:1.5=0A***=20= ComUnidraw/comeditor.c:1.4=09Fri=20May=2016=2010:47:58=202008=0A---=20= src/ComUnidraw/comeditor.c=09Wed=20Aug=2026=2009:21:39=202009=0A= ***************=0A***=20232,237=20****=0A---=20232,247=20----=0A=20=20=0A= =20=20=20=20=20=20comterp->add_command("trans",=20new=20= TransformerFunc(comterp,=20this));=0A=20=20=0A+=20=20=20=20=20#ifdef=20= LEAKCHECK=0A+=20=20=20=20=20comterp->add_command("compleak",=20new=20= CompLeakFunc(comterp));=0A+=20=20=20=20=20= comterp->add_command("viewleak",=20new=20ViewLeakFunc(comterp));=0A+=20=20= =20=20=20comterp->add_command("alistleak",=20new=20= AlistLeakFunc(comterp));=0A+=20=20=20=20=20= comterp->add_command("attrvleak",=20new=20AttrvLeakFunc(comterp));=0A+=20= =20=20=20=20comterp->add_command("mlineleak",=20new=20= MlineLeakFunc(comterp));=0A+=20=20=20=20=20= comterp->add_command("graphicleak",=20new=20GraphicLeakFunc(comterp));=0A= +=20=20=20=20=20comterp->add_command("commandleak",=20new=20= CommandLeakFunc(comterp));=0A+=20=20=20=20=20#endif=0A+=20=0A=20=20}=0A=20= =20=0A=20=20/*=20virtual=20*/=20void=20ComEditor::ExecuteCmd(Command*=20= cmd)=20{=0AIndex:=20ComUnidraw/grfunc.c=0Adiff=20-c=20= ComUnidraw/grfunc.c:1.6=20ComUnidraw/grfunc.c:1.7=0A***=20= ComUnidraw/grfunc.c:1.6=09Sat=20Oct=2025=2010:25:07=202008=0A---=20= src/ComUnidraw/grfunc.c=09Wed=20Aug=2026=2009:21:39=202009=0A= ***************=0A***=20165,172=20****=0A=20=20=09= comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20= compval(symbol_add("RectComp"),=20new=20OverlayView(comp));=0A!=20=09= compval.object_compview(true);=0A=20=20=09push_stack(compval);=0A=20=20=09= execute_log(cmd);=0A=20=20=20=20=20=20}=20else=20=0A---=20165,171=20----=0A= =20=20=09comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20compval(new=20= OverlayViewRef(comp),=20symbol_add("RectComp"));=0A=20=20=09= push_stack(compval);=0A=20=20=09execute_log(cmd);=0A=20=20=20=20=20=20}=20= else=20=0A***************=0A***=20231,238=20****=0A=20=20=09= comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20= compval(symbol_add("ArrowLineComp"),=20new=20OverlayView(comp));=0A!=20=09= compval.object_compview(true);=0A=20=20=09push_stack(compval);=0A=20=20=09= execute_log(cmd);=0A=20=20=20=20=20=20}=20else=20=0A---=20230,236=20----=0A= =20=20=09comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20compval(new=20= OverlayViewRef(comp),=20symbol_add("ArrowLineComp"));=0A=20=20=09= push_stack(compval);=0A=20=20=09execute_log(cmd);=0A=20=20=20=20=20=20}=20= else=20=0A***************=0A***=20296,303=20****=0A=20=20=09= comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20= compval(symbol_add("EllipseComp"),=20new=20OverlayView(comp));=0A!=20=09= compval.object_compview(true);=0A=20=20=09push_stack(compval);=0A=20=20=09= execute_log(cmd);=0A=20=20=20=20=20=20}=20else=20=0A---=20294,300=20----=0A= =20=20=09comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20compval(=20= new=20OverlayViewRef(comp),=20symbol_add("EllipseComp"));=0A=20=20=09= push_stack(compval);=0A=20=20=09execute_log(cmd);=0A=20=20=20=20=20=20}=20= else=20=0A***************=0A***=20363,370=20****=0A=20=20=09= comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20= compval(symbol_add("TextComp"),=20new=20OverlayView(comp));=0A!=20=09= compval.object_compview(true);=0A=20=20=09push_stack(compval);=0A=20=20=09= execute_log(cmd);=0A=20=20=20=20=20=20}=20else=0A---=20360,366=20----=0A=20= =20=09comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20compval(new=20= OverlayViewRef(comp),=20symbol_add("TextComp"));=0A=20=20=09= push_stack(compval);=0A=20=20=09execute_log(cmd);=0A=20=20=20=20=20=20}=20= else=0A***************=0A***=20430,437=20****=0A=20=20=09= comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20= compval(symbol_add("ArrowMultiLineComp"),=20new=20OverlayView(comp));=0A= !=20=09compval.object_compview(true);=0A=20=20=09push_stack(compval);=0A=20= =20=09execute_log(cmd);=0A=20=20=20=20=20=20}=20else=20=0A---=20426,432=20= ----=0A=20=20=09comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20compval(new=20= OverlayViewRef(comp),=20symbol_add("ArrowMultiLineComp"));=0A=20=20=09= push_stack(compval);=0A=20=20=09execute_log(cmd);=0A=20=20=20=20=20=20}=20= else=20=0A***************=0A***=20497,504=20****=0A=20=20=09= comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20= compval(symbol_add("ArrowSplineComp"),=20new=20OverlayView(comp));=0A!=20= =09compval.object_compview(true);=0A=20=20=09push_stack(compval);=0A=20=20= =09execute_log(cmd);=0A=20=20=20=20=20=20}=20else=20=0A---=20492,498=20= ----=0A=20=20=09comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20compval(new=20= OverlayViewRef(comp),=20symbol_add("ArrowSplineComp"));=0A=20=20=09= push_stack(compval);=0A=20=20=09execute_log(cmd);=0A=20=20=20=20=20=20}=20= else=20=0A***************=0A***=20562,569=20****=0A=20=20=09= comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20= compval(symbol_add("PolygonComp"),=20new=20OverlayView(comp));=0A!=20=09= compval.object_compview(true);=0A=20=20=09push_stack(compval);=0A=20=20=09= execute_log(cmd);=0A=20=20=20=20=20=20}=20else=20=0A---=20556,562=20----=0A= =20=20=09comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20compval(new=20= OverlayViewRef(comp),=20symbol_add("PolygonComp"));=0A=20=20=09= push_stack(compval);=0A=20=20=09execute_log(cmd);=0A=20=20=20=20=20=20}=20= else=20=0A***************=0A***=20628,635=20****=0A=20=20=09= comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20= compval(symbol_add("ClosedSplineComp"),=20new=20OverlayView(comp));=0A!=20= =09compval.object_compview(true);=0A=20=20=09push_stack(compval);=0A=20=20= =09execute_log(cmd);=0A=20=20=20=20=20=20}=20else=20=0A---=20621,627=20= ----=0A=20=20=09comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20compval(new=20= OverlayViewRef(comp),=20symbol_add("ClosedSplineComp"));=0A=20=20=09= push_stack(compval);=0A=20=20=09execute_log(cmd);=0A=20=20=20=20=20=20}=20= else=20=0A***************=0A***=20699,706=20****=0A=20=20=09= comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20= compval(symbol_add("RasterComp"),=20new=20OverlayView(comp));=0A!=20=09= compval.object_compview(true);=0A=20=20=09push_stack(compval);=0A=20=20=09= execute_log(cmd);=0A=20=20=20=20=20=20}=20else=20=0A---=20691,697=20----=0A= =20=20=09comp->SetAttributeList(al);=0A=20=20=09if=20= (PasteModeFunc::paste_mode()=3D=3D0)=0A=20=20=09=20=20cmd=20=3D=20new=20= PasteCmd(_ed,=20new=20Clipboard(comp));=0A!=20=09ComValue=20compval(new=20= OverlayViewRef(comp),=20symbol_add("RasterComp"));=0A=20=20=09= push_stack(compval);=0A=20=20=09execute_log(cmd);=0A=20=20=20=20=20=20}=20= else=20=0A***************=0A***=20965,972=20****=0A=20=20=09GraphicView*=20= subgv=20=3D=20gv->GetView(i);=0A=20=20=09newSel->Append(subgv);=0A=20=20=09= OverlayComp*=20comp=20=3D=20(OverlayComp*)subgv->GetGraphicComp();=0A!=20= =09ComValue*=20compval=20=3D=20new=20ComValue(comp->classid(),=20new=20= OverlayView(comp));=0A!=20=09compval->object_compview(true);=0A=20=20=09= avl->Append(compval);=0A=20=20=20=20=20=20=20=20}=0A=20=20=0A---=20= 956,962=20----=0A=20=20=09GraphicView*=20subgv=20=3D=20gv->GetView(i);=0A= =20=20=09newSel->Append(subgv);=0A=20=20=09OverlayComp*=20comp=20=3D=20= (OverlayComp*)subgv->GetGraphicComp();=0A!=20=09ComValue*=20compval=20=3D=20= new=20ComValue(new=20OverlayViewRef(comp),=20comp->classid());=0A=20=20=09= avl->Append(compval);=0A=20=20=20=20=20=20=20=20}=0A=20=20=0A= ***************=0A***=20976,985=20****=0A=20=20=20=20=20=20=20=20for=20= (sel->First(i);=20!sel->Done(i);=20sel->Next(i))=20{=0A=20=20=09= GraphicView*=20grview=20=3D=20sel->GetView(i);=0A=20=20=09OverlayComp*=20= comp=20=3D=20grview=20?=20(OverlayComp*)grview->GetSubject()=20:=20nil;=0A= !=20=09ComValue*=20compval=20=3D=20comp=20?=20new=20= ComValue(comp->classid(),=20new=20OverlayView(comp))=20:=20nil;=0A=20=20=0A= =20=20=09if=20(compval)=20{=0A-=20=09=20=20= compval->object_compview(true);=0A=20=20=09=20=20avl->Append(compval);=0A= =20=20=09}=0A=20=20=09delete=20newSel;=0A---=20966,974=20----=0A=20=20=20= =20=20=20=20=20for=20(sel->First(i);=20!sel->Done(i);=20sel->Next(i))=20= {=0A=20=20=09GraphicView*=20grview=20=3D=20sel->GetView(i);=0A=20=20=09= OverlayComp*=20comp=20=3D=20grview=20?=20= (OverlayComp*)grview->GetSubject()=20:=20nil;=0A!=20=09ComValue*=20= compval=20=3D=20comp=20?=20new=20ComValue(new=20OverlayViewRef(comp),=20= comp->classid())=20:=20nil;=0A=20=20=0A=20=20=09if=20(compval)=20{=0A=20=20= =09=20=20avl->Append(compval);=0A=20=20=09}=0A=20=20=09delete=20newSel;=0A= ***************=0A***=20995,1002=20****=0A=20=20=09=20=20OverlayComp*=20= comp=20=3D=20(OverlayComp*)comview->GetSubject();=0A=20=20=09=20=20if=20= (comp)=20{=0A=20=20=09=20=20=20=20= newSel->Append(comp->FindView(viewer));=0A!=20=09=20=20=20=20ComValue*=20= compval=20=3D=20new=20ComValue(comp->classid(),=20new=20= OverlayView(comp));=0A!=20=09=20=20=20=20compval->object_compview(true);=0A= =20=20=09=20=20=20=20avl->Append(compval);=0A=20=20=09=20=20}=0A=20=20=09= }=20else=20if=20(obj.is_array())=20{=0A---=20984,990=20----=0A=20=20=09=20= =20OverlayComp*=20comp=20=3D=20(OverlayComp*)comview->GetSubject();=0A=20= =20=09=20=20if=20(comp)=20{=0A=20=20=09=20=20=20=20= newSel->Append(comp->FindView(viewer));=0A!=20=09=20=20=20=20ComValue*=20= compval=20=3D=20new=20ComValue(new=20OverlayViewRef(comp),=20= comp->classid());=0A=20=20=09=20=20=20=20avl->Append(compval);=0A=20=20=09= =20=20}=0A=20=20=09}=20else=20if=20(obj.is_array())=20{=0A= ***************=0A***=201009,1016=20****=0A=20=20=09=20=20=20=20=20=20= OverlayComp*=20comp=20=3D=20(OverlayComp*)comview->GetSubject();=0A=20=20= =09=20=20=20=20=20=20if=20(comp)=20{=0A=20=20=09=09= newSel->Append(comp->FindView(viewer));=0A!=20=09=09ComValue*=20compval=20= =3D=20new=20ComValue(comp->classid(),=20new=20OverlayView(comp));=0A!=20=09= =09compval->object_compview(true);=0A=20=20=09=09avl->Append(compval);=0A= =20=20=09=20=20=20=20=20=20}=0A=20=20=09=20=20=20=20}=0A---=20997,1003=20= ----=0A=20=20=09=20=20=20=20=20=20OverlayComp*=20comp=20=3D=20= (OverlayComp*)comview->GetSubject();=0A=20=20=09=20=20=20=20=20=20if=20= (comp)=20{=0A=20=20=09=09newSel->Append(comp->FindView(viewer));=0A!=20=09= =09ComValue*=20compval=20=3D=20new=20ComValue(new=20= OverlayViewRef(comp),=20comp->classid());=0A=20=20=09=09= avl->Append(compval);=0A=20=20=09=20=20=20=20=20=20}=0A=20=20=09=20=20=20= =20}=0A***************=0A***=201378,1385=20****=0A=20=20=09=20=20=20=20= Transformer=20t(a00,=20a01,=20a10,=20a11,=20a20,=20a21);=0A=20=20=09=20=20= =20=20*gr->GetTransformer()=3Dt;=0A=20=20=0A!=20=09=20=20=20=20ComValue=20= compval(comp->class_symid(),=20new=20OverlayView(comp));=0A!=20=09=20=20=20= =20compval.object_compview(true);=0A=20=20=09=20=20=20=20= push_stack(compval);=0A=20=20=09=20=20}=0A=20=20=09}=0A---=201365,1371=20= ----=0A=20=20=09=20=20=20=20Transformer=20t(a00,=20a01,=20a10,=20a11,=20= a20,=20a21);=0A=20=20=09=20=20=20=20*gr->GetTransformer()=3Dt;=0A=20=20=0A= !=20=09=20=20=20=20ComValue=20compval(new=20OverlayViewRef(comp),=20= comp->class_symid());=0A=20=20=09=20=20=20=20push_stack(compval);=0A=20=20= =09=20=20}=0A=20=20=09}=0A***************=0A***=201387,1389=20****=0A---=20= 1373,1456=20----=0A=20=20=20=20=20=20}=0A=20=20}=0A=20=20=0A+=20= /*************************************************************************= ****/=0A+=20=0A+=20#ifdef=20LEAKCHECK=0A+=20#include=20<leakchecker.h>=0A= +=20=0A+=20CompLeakFunc::CompLeakFunc(ComTerp*=20comterp)=20:=20= ComFunc(comterp)=20{=0A+=20}=0A+=20=0A+=20void=20CompLeakFunc::execute()=20= {=0A+=20=20=20reset_stack();=0A+=20=20=20ComValue=20= retval(OverlayComp::_leakchecker->alive(),=20ComValue::IntType);=0A+=20=20= =20push_stack(retval);=0A+=20}=0A+=20=0A+=20= /*************************************************************************= ****/=0A+=20=0A+=20ViewLeakFunc::ViewLeakFunc(ComTerp*=20comterp)=20:=20= ComFunc(comterp)=20{=0A+=20}=0A+=20=0A+=20void=20ViewLeakFunc::execute()=20= {=0A+=20=20=20reset_stack();=0A+=20=20=20ComValue=20= retval(OverlayView::_leakchecker->alive(),=20ComValue::IntType);=0A+=20=20= =20push_stack(retval);=0A+=20}=0A+=20=0A+=20= /*************************************************************************= ****/=0A+=20=0A+=20AlistLeakFunc::AlistLeakFunc(ComTerp*=20comterp)=20:=20= ComFunc(comterp)=20{=0A+=20}=0A+=20=0A+=20void=20= AlistLeakFunc::execute()=20{=0A+=20=20=20reset_stack();=0A+=20=20=20= ComValue=20retval(AttributeValueList::_leakchecker=20?=20= AttributeValueList::_leakchecker->alive()=20:=200,=20ComValue::IntType);=0A= +=20=20=20push_stack(retval);=0A+=20}=0A+=20=0A+=20= /*************************************************************************= ****/=0A+=20=0A+=20AttrvLeakFunc::AttrvLeakFunc(ComTerp*=20comterp)=20:=20= ComFunc(comterp)=20{=0A+=20}=0A+=20=0A+=20void=20= AttrvLeakFunc::execute()=20{=0A+=20=20=20reset_stack();=0A+=20=20=20= ComValue=20retval(AttributeValue::_leakchecker=20?=20= AttributeValue::_leakchecker->alive()=20:=200,=20ComValue::IntType);=0A+=20= =20=20push_stack(retval);=0A+=20}=0A+=20=0A+=20= /*************************************************************************= ****/=0A+=20=0A+=20MlineLeakFunc::MlineLeakFunc(ComTerp*=20comterp)=20:=20= ComFunc(comterp)=20{=0A+=20}=0A+=20=0A+=20void=20= MlineLeakFunc::execute()=20{=0A+=20=20=20reset_stack();=0A+=20=20=20= ComValue=20retval(MultiLineObj::_leakchecker=20?=20= MultiLineObj::_leakchecker->alive()=20:=200,=20ComValue::IntType);=0A+=20= =20=20push_stack(retval);=0A+=20}=0A+=20=0A+=20= /*************************************************************************= ****/=0A+=20=0A+=20GraphicLeakFunc::GraphicLeakFunc(ComTerp*=20comterp)=20= :=20ComFunc(comterp)=20{=0A+=20}=0A+=20=0A+=20void=20= GraphicLeakFunc::execute()=20{=0A+=20=20=20reset_stack();=0A+=20=20=20= ComValue=20retval(Graphic::_leakchecker=20?=20= Graphic::_leakchecker->alive()=20:=200,=20ComValue::IntType);=0A+=20=20=20= push_stack(retval);=0A+=20}=0A+=20=0A+=20= /*************************************************************************= ****/=0A+=20=0A+=20CommandLeakFunc::CommandLeakFunc(ComTerp*=20comterp)=20= :=20ComFunc(comterp)=20{=0A+=20}=0A+=20=0A+=20void=20= CommandLeakFunc::execute()=20{=0A+=20=20=20reset_stack();=0A+=20=20=20= ComValue=20retval(Command::_leakchecker=20?=20= Command::_leakchecker->alive()=20:=200,=20ComValue::IntType);=0A+=20=20=20= push_stack(retval);=0A+=20}=0A+=20#endif=0A+=20=0AIndex:=20= ComUnidraw/grfunc.h=0Adiff=20-c=20ComUnidraw/grfunc.h:1.3=20= ComUnidraw/grfunc.h:1.4=0A***=20ComUnidraw/grfunc.h:1.3=09Sat=20Oct=2025=20= 10:25:07=202008=0A---=20src/ComUnidraw/grfunc.h=09Wed=20Aug=2026=20= 09:21:39=202009=0A***************=0A***=2026,31=20****=0A---=2026,32=20= ----=0A=20=20#if=20!defined(grfunc_h)=0A=20=20#define=20_grfunc_h=0A=20=20= =0A+=20#define=20LEAKCHECK=0A=20=20=0A=20=20#include=20= <ComUnidraw/unifunc.h>=0A=20=20=0A***************=0A***=20383,386=20****=0A= ---=20384,459=20----=0A=20=20=20=20=20=20=20=20return=20= "[compview|a00,a01,a10,a11,a20,a21]=3Dtrans(compview=20= [a00,a01,a10,a11,a20,a21])=20--=20set/get=20transformer=20associated=20= with=20a=20graphic";=20}=0A=20=20};=0A=20=20=0A+=20#ifdef=20LEAKCHECK=0A= +=20//:=20command=20to=20return=20current=20number=20of=20OverlayComp's=0A= +=20//=20compleak()=20--=20current=20number=20of=20OverlayComp's=0A+=20= class=20CompLeakFunc=20:=20public=20ComFunc=20{=0A+=20public:=0A+=20=20=20= =20=20CompLeakFunc(ComTerp*);=0A+=20=20=20=20=20virtual=20void=20= execute();=0A+=20=20=20=20=20virtual=20const=20char*=20docstring()=20{=20= =0A+=20=09return=20"%s()=20--=20current=20number=20of=20OverlayComp's";=20= }=0A+=20};=0A+=20=0A+=20//:=20command=20to=20return=20current=20number=20= of=20OverlayView's=0A+=20//=20viewleak()=20--=20current=20number=20of=20= OverlayView's=0A+=20class=20ViewLeakFunc=20:=20public=20ComFunc=20{=0A+=20= public:=0A+=20=20=20=20=20ViewLeakFunc(ComTerp*);=0A+=20=20=20=20=20= virtual=20void=20execute();=0A+=20=20=20=20=20virtual=20const=20char*=20= docstring()=20{=20=0A+=20=09return=20"%s()=20--=20current=20number=20of=20= OverlayView's";=20}=0A+=20};=0A+=20=0A+=20//:=20command=20to=20return=20= current=20number=20of=20AttributeValueList's=0A+=20//=20alistleak()=20--=20= current=20number=20of=20AttributeValueList's=0A+=20class=20AlistLeakFunc=20= :=20public=20ComFunc=20{=0A+=20public:=0A+=20=20=20=20=20= AlistLeakFunc(ComTerp*);=0A+=20=20=20=20=20virtual=20void=20execute();=0A= +=20=20=20=20=20virtual=20const=20char*=20docstring()=20{=20=0A+=20=09= return=20"%s()=20--=20current=20number=20of=20AttributeValueList's";=20}=0A= +=20};=0A+=20=0A+=20//:=20command=20to=20return=20current=20number=20of=20= AttributeValue's=0A+=20//=20attrvleak()=20--=20current=20number=20of=20= AttributeValue's=0A+=20class=20AttrvLeakFunc=20:=20public=20ComFunc=20{=0A= +=20public:=0A+=20=20=20=20=20AttrvLeakFunc(ComTerp*);=0A+=20=20=20=20=20= virtual=20void=20execute();=0A+=20=20=20=20=20virtual=20const=20char*=20= docstring()=20{=20=0A+=20=09return=20"%s()=20--=20current=20number=20of=20= AttributeValue's";=20}=0A+=20};=0A+=20=0A+=20//:=20command=20to=20return=20= current=20number=20of=20MultiLineObj's=0A+=20//=20attrvleak()=20--=20= current=20number=20of=20MultiLineObj's=0A+=20class=20MlineLeakFunc=20:=20= public=20ComFunc=20{=0A+=20public:=0A+=20=20=20=20=20= MlineLeakFunc(ComTerp*);=0A+=20=20=20=20=20virtual=20void=20execute();=0A= +=20=20=20=20=20virtual=20const=20char*=20docstring()=20{=20=0A+=20=09= return=20"%s()=20--=20current=20number=20of=20MultiLineObj's";=20}=0A+=20= };=0A+=20=0A+=20//:=20command=20to=20return=20current=20number=20of=20= Graphic's=0A+=20//=20attrvleak()=20--=20current=20number=20of=20= Graphic's=0A+=20class=20GraphicLeakFunc=20:=20public=20ComFunc=20{=0A+=20= public:=0A+=20=20=20=20=20GraphicLeakFunc(ComTerp*);=0A+=20=20=20=20=20= virtual=20void=20execute();=0A+=20=20=20=20=20virtual=20const=20char*=20= docstring()=20{=20=0A+=20=09return=20"%s()=20--=20current=20number=20of=20= Graphic's";=20}=0A+=20};=0A+=20=0A+=20//:=20command=20to=20return=20= current=20number=20of=20Command's=0A+=20//=20attrvleak()=20--=20current=20= number=20of=20Command's=0A+=20class=20CommandLeakFunc=20:=20public=20= ComFunc=20{=0A+=20public:=0A+=20=20=20=20=20CommandLeakFunc(ComTerp*);=0A= +=20=20=20=20=20virtual=20void=20execute();=0A+=20=20=20=20=20virtual=20= const=20char*=20docstring()=20{=20=0A+=20=09return=20"%s()=20--=20= current=20number=20of=20Command's";=20}=0A+=20};=0A+=20#endif=0A+=20=0A=20= =20#endif=20/*=20!defined(_grfunc_h)=20*/=0AIndex:=20= ComUnidraw/grlistfunc.c=0Adiff=20-c=20ComUnidraw/grlistfunc.c:1.2=20= ComUnidraw/grlistfunc.c:1.3=0A***=20ComUnidraw/grlistfunc.c:1.2=09Fri=20= May=2016=2010:47:58=202008=0A---=20src/ComUnidraw/grlistfunc.c=09Wed=20= Aug=2026=2009:21:39=202009=0A***************=0A***=2056,63=20****=0A=20=20= =09if=20(count=3D=3Dnv.int_val())=20{=0A=20=20=09=20=20OverlayComp*=20= retcomp=20=3D=20(OverlayComp*)comps->GetComp(i);=0A=20=20=09=20=20if=20= (retcomp)=20{=0A!=20=09=20=20=20=20ComValue=20retval(retcomp->classid(),=20= new=20OverlayView(retcomp));=0A!=20=09=20=20=20=20= retval.object_compview(true);=0A=20=20=09=20=20=20=20push_stack(retval);=0A= =20=20=09=20=20=20=20return;=0A=20=20=09=20=20}=0A---=2056,62=20----=0A=20= =20=09if=20(count=3D=3Dnv.int_val())=20{=0A=20=20=09=20=20OverlayComp*=20= retcomp=20=3D=20(OverlayComp*)comps->GetComp(i);=0A=20=20=09=20=20if=20= (retcomp)=20{=0A!=20=09=20=20=20=20ComValue=20retval(new=20= OverlayViewRef(retcomp),=20retcomp->classid());=0A=20=20=09=20=20=20=20= push_stack(retval);=0A=20=20=09=20=20=20=20return;=0A=20=20=09=20=20}=0A= Index:=20ComUnidraw/groupfunc.c=0Adiff=20-c=20ComUnidraw/groupfunc.c:1.2=20= ComUnidraw/groupfunc.c:1.3=0A***=20ComUnidraw/groupfunc.c:1.2=09Fri=20= May=2016=2010:47:58=202008=0A---=20src/ComUnidraw/groupfunc.c=09Wed=20= Aug=2026=2009:21:39=202009=0A***************=0A***=2087,94=20****=0A=20=20= =20=20=20=20=20=20mcmd->Append(gcmd);=0A=20=20=0A=20=20=20=20=20=20=20=20= execute_log(mcmd);=0A!=20=20=20=20=20=20=20ComValue=20= retval(OverlaysComp::class_symid(),=20new=20OverlayView(grgroup));=0A!=20= =20=20=20=20=20=20retval.object_compview(true);=0A=20=20=20=20=20=20=20=20= push_stack(retval);=0A=20=20=20=20=20=20=20=20return;=0A=20=20=20=20=20=20= }=0A---=2087,93=20----=0A=20=20=20=20=20=20=20=20mcmd->Append(gcmd);=0A=20= =20=0A=20=20=20=20=20=20=20=20execute_log(mcmd);=0A!=20=20=20=20=20=20=20= ComValue=20retval(new=20OverlayViewRef(grgroup),=20= OverlaysComp::class_symid());=0A=20=20=20=20=20=20=20=20= push_stack(retval);=0A=20=20=20=20=20=20=20=20return;=0A=20=20=20=20=20=20= }=0A***************=0A***=20154,161=20****=0A=20=20=20=20=20=20=20=20= mcmd->Append(gcmd);=0A=20=20=0A=20=20=20=20=20=20=20=20= execute_log(mcmd);=0A!=20=20=20=20=20=20=20ComValue=20= retval(OverlaysComp::class_symid(),=20new=20OverlayView(grgroup));=0A!=20= =20=20=20=20=20=20retval.object_compview(true);=0A=20=20=20=20=20=20=20=20= push_stack(retval);=0A=20=20=20=20=20=20=20=20return;=0A=20=20=20=20=20=20= }=0A---=20153,159=20----=0A=20=20=20=20=20=20=20=20mcmd->Append(gcmd);=0A= =20=20=0A=20=20=20=20=20=20=20=20execute_log(mcmd);=0A!=20=20=20=20=20=20= =20ComValue=20retval(new=20OverlayViewRef(grgroup),=20= OverlaysComp::class_symid());=0A=20=20=20=20=20=20=20=20= push_stack(retval);=0A=20=20=20=20=20=20=20=20return;=0A=20=20=20=20=20=20= }=0AIndex:=20ComUnidraw/unifunc.c=0Adiff=20-c=20ComUnidraw/unifunc.c:1.4=20= ComUnidraw/unifunc.c:1.5=0A***=20ComUnidraw/unifunc.c:1.4=09Fri=20May=20= 16=2010:47:58=202008=0A---=20src/ComUnidraw/unifunc.c=09Wed=20Aug=2026=20= 09:21:39=202009=0A***************=0A***=20321,340=20****=0A=20=20=20=20=20= =20=20=20if=20(nargs()=3D=3D1=20||=20next_flag)=20{=0A=20=20=09if=20= ((cmd=20=3D=20import(next_flag=20?=20lastpath=20:=20= pathnamev.string_ptr(),=20=0A=20=20=09=09=09=20=20popen_flag))=20&&=20= cmd->component())=20{=0A!=20=09=20=20ComValue=20= compval(((OverlayComp*)cmd->component())->classid(),=0A!=20=09=09=09=20=20= =20new=20OverlayView((OverlayComp*)cmd->component()));=0A=20=20=09=20=20= delete=20cmd;=0A-=20=09=20=20compval.object_compview(true);=0A=20=20=09=20= =20push_stack(compval);=0A=20=20=09}=20else=0A=20=20=09=20=20= push_stack(ComValue::nullval());=0A=20=20=20=20=20=20=20=20}=20else=20{=0A= =20=20=09for=20(int=20i=3D0;=20i<nargs();=20i++)=20=0A=20=20=09=20=20if=20= (cmd=20=3D=20import(stack_arg(i).string_ptr(),=20popen_flag))=20{=0A!=20=09= =20=20=20=20ComValue=20= compval(((OverlayComp*)cmd->component())->classid(),=0A!=20=09=09=09=20=20= =20=20=20new=20OverlayView((OverlayComp*)cmd->component()));=0A=20=20=09=20= =20=20=20delete=20cmd;=0A-=20=09=20=20=20=20= compval.object_compview(true);=0A=20=20=09=20=20=20=20= push_stack(compval);=0A=20=20=0A=20=20=09=20=20}=20else=0A---=20321,338=20= ----=0A=20=20=20=20=20=20=20=20if=20(nargs()=3D=3D1=20||=20next_flag)=20= {=0A=20=20=09if=20((cmd=20=3D=20import(next_flag=20?=20lastpath=20:=20= pathnamev.string_ptr(),=20=0A=20=20=09=09=09=20=20popen_flag))=20&&=20= cmd->component())=20{=0A!=20=09=20=20ComValue=20compval(new=20= OverlayViewRef((OverlayComp*)cmd->component()),=0A!=20=09=09=09=20=20=20= ((OverlayComp*)cmd->component())->classid());=0A=20=20=09=20=20delete=20= cmd;=0A=20=20=09=20=20push_stack(compval);=0A=20=20=09}=20else=0A=20=20=09= =20=20push_stack(ComValue::nullval());=0A=20=20=20=20=20=20=20=20}=20= else=20{=0A=20=20=09for=20(int=20i=3D0;=20i<nargs();=20i++)=20=0A=20=20=09= =20=20if=20(cmd=20=3D=20import(stack_arg(i).string_ptr(),=20popen_flag))=20= {=0A!=20=09=20=20=20=20ComValue=20compval(new=20= OverlayViewRef((OverlayComp*)cmd->component()),=0A!=20=09=09=09=20=20=20=20= =20((OverlayComp*)cmd->component())->classid());=0A=20=20=09=20=20=20=20= delete=20cmd;=0A=20=20=09=20=20=20=20push_stack(compval);=0A=20=20=0A=20=20= =09=20=20}=20else=0A***************=0A***=20347,356=20****=0A=20=20=20=20= =20=20=20=20inlist->First(it);=0A=20=20=20=20=20=20=20=20= while(!inlist->Done(it))=20{=0A=20=20=09cmd=20=3D=20= import(inlist->GetAttrVal(it)->string_ptr(),=20popen_flag);=0A!=20=09= ComValue*=20val=20=3D=20new=20= ComValue(((OverlayComp*)cmd->component())->classid(),=0A!=20=09=09=09=09=20= =20=20=20=20new=20OverlayView((OverlayComp*)cmd->component()));=0A=20=20=09= delete=20cmd;=0A-=20=09val->object_compview(true);=0A=20=20=09= outlist->Append(val);=0A=20=20=09inlist->Next(it);=0A=20=20=20=20=20=20=20= =20}=0A---=20345,353=20----=0A=20=20=20=20=20=20=20=20inlist->First(it);=0A= =20=20=20=20=20=20=20=20while(!inlist->Done(it))=20{=0A=20=20=09cmd=20=3D=20= import(inlist->GetAttrVal(it)->string_ptr(),=20popen_flag);=0A!=20=09= ComValue*=20val=20=3D=20new=20ComValue(new=20= OverlayViewRef((OverlayComp*)cmd->component()),=0A!=20=09=09=09=09=20=20=20= =20=20((OverlayComp*)cmd->component())->classid());=0A=20=20=09delete=20= cmd;=0A=20=20=09outlist->Append(val);=0A=20=20=09inlist->Next(it);=0A=20=20= =20=20=20=20=20=20}=0A***************=0A***=20633,640=20****=0A=20=20=20=20= =20=20OverlaysView*=20frameview=20=3D=20ed->GetFrame(indexv.int_val());=0A= =20=20=20=20=20=20if=20(frameview=20&&=20frameview->GetSubject())=20{=0A=20= =20=20=20=20=20=20=20OverlayComp*=20comp=20=3D=20= (OverlayComp*)frameview->GetSubject();=0A!=20=20=20=20=20=20=20ComValue=20= retval(comp->classid(),=20new=20OverlayView(comp));=0A!=20=20=20=20=20=20= =20retval.object_compview(true);=0A=20=20=20=20=20=20=20=20= push_stack(retval);=0A=20=20=20=20=20=20}=20else=0A=20=20=20=20=20=20=20=20= push_stack(ComValue::nullval());=0A---=20630,636=20----=0A=20=20=20=20=20= =20OverlaysView*=20frameview=20=3D=20ed->GetFrame(indexv.int_val());=0A=20= =20=20=20=20=20if=20(frameview=20&&=20frameview->GetSubject())=20{=0A=20=20= =20=20=20=20=20=20OverlayComp*=20comp=20=3D=20= (OverlayComp*)frameview->GetSubject();=0A!=20=20=20=20=20=20=20ComValue=20= retval(new=20OverlayViewRef(comp),=20comp->classid());=0A=20=20=20=20=20=20= =20=20push_stack(retval);=0A=20=20=20=20=20=20}=20else=0A=20=20=20=20=20=20= =20=20push_stack(ComValue::nullval());=0A***************=0A***=20688,695=20= ****=0A=20=20=20=20=20=20OverlayEditor*=20ed=20=3D=20= (OverlayEditor*)GetEditor();=0A=20=20=20=20=20=20OverlayComp*=20comp=20=3D= =20ed->overlay_kit()->add_tool_button(pathnamev.symbol_ptr());=0A=20=20=20= =20=20=20if=20(comp)=20{=0A!=20=20=20=20=20=20=20ComValue=20= retval(comp->classid(),=20new=20OverlayView(comp));=0A!=20=20=20=20=20=20= =20retval.object_compview(true);=0A=20=20=20=20=20=20=20=20= push_stack(retval);=0A=20=20=20=20=20=20}=20else=20{=0A=20=20=20=20=20=20= =20=20push_stack(ComValue::nullval());=0A---=20684,690=20----=0A=20=20=20= =20=20=20OverlayEditor*=20ed=20=3D=20(OverlayEditor*)GetEditor();=0A=20=20= =20=20=20=20OverlayComp*=20comp=20=3D=20= ed->overlay_kit()->add_tool_button(pathnamev.symbol_ptr());=0A=20=20=20=20= =20=20if=20(comp)=20{=0A!=20=20=20=20=20=20=20ComValue=20retval(new=20= OverlayViewRef(comp),=20comp->classid());=0A=20=20=20=20=20=20=20=20= push_stack(retval);=0A=20=20=20=20=20=20}=20else=20{=0A=20=20=20=20=20=20= =20=20push_stack(ComValue::nullval());=0AIndex:=20DrawServ/drawclasses.h=0A= diff=20-c=20DrawServ/drawclasses.h:1.2=20DrawServ/drawclasses.h:1.3=0A= ***=20DrawServ/drawclasses.h:1.2=09Mon=20May=2018=2016:43:01=202009=0A= ---=20src/DrawServ/drawclasses.h=09Wed=20Aug=2026=2009:21:42=202009=0A= ***************=0A***=2035,40=20****=0A=20=20#define=20DRAWLINK_COMP=20=20= =20=20=20=20=209802=0A=20=20=0A=20=20#define=20DRAWIMPORT_CMD=20=20=20=20= =20=209803=0A!=20#define=20DRAWPASTE_CMD=20=20=20=20=20=20=209804=0A=20=20= =0A=20=20#endif=0A---=2035,41=20----=0A=20=20#define=20DRAWLINK_COMP=20=20= =20=20=20=20=209802=0A=20=20=0A=20=20#define=20DRAWIMPORT_CMD=20=20=20=20= =20=209803=0A!=20#define=20DRAWIMPORTPASTE_CMD=209804=0A!=20#define=20= COPYMOVEGRAPHFRAME_CMD=209805=0A=20=20=0A=20=20#endif=0AIndex:=20= DrawServ/drawcmds.c=0Adiff=20-c=20DrawServ/drawcmds.c:1.1=20= DrawServ/drawcmds.c:1.2=0A***=20DrawServ/drawcmds.c:1.1=09Mon=20May=2018=20= 16:45:10=202009=0A---=20src/DrawServ/drawcmds.c=09Wed=20Aug=2026=20= 09:21:42=202009=0A***************=0A***=2037,148=20****=0A=20=20#include=20= <Unidraw/clipboard.h>=0A=20=20#include=20<Unidraw/iterator.h>=0A=20=20=0A= !=20static=20NodeComp*=20node=20(Clipboard*=20cb,=20int=20index)=20{=0A!=20= =20=20=20=20if=20(index=20=3D=3D=20-1)=0A!=20=09return=20nil;=0A!=20=0A!=20= =20=20=20=20Iterator=20i;=0A!=20=20=20=20=20int=20count=20=3D=20-1;=0A!=20= =20=20=20=20for=20(cb->First(i);=20!cb->Done(i);=20cb->Next(i))=20{=0A!=20= =09GraphicComp*=20gcomp=20=3D=20cb->GetComp(i);=0A!=20=09if=20= (gcomp->IsA(NODE_COMP))=20{=0A!=20=09=20=20=20=20count++;=0A!=20=09=20=20= =20=20if=20(count=20=3D=3D=20index)=0A!=20=09=20=20=20=20=20=20=20=20= return=20(NodeComp*)gcomp;=0A!=20=20=20=20=20=20=20=20=20}=0A!=20=20=20=20= =20}=0A!=20=20=20=20=20return=20nil;=0A!=20}=0A!=20=0A!=20= /*************************************************************************= ****/=0A!=20=0A!=20ClassId=20DrawPasteCmd::GetClassId=20()=20{=20return=20= DRAWPASTE_CMD;=20}=0A!=20=0A!=20boolean=20DrawPasteCmd::IsA=20(ClassId=20= id)=20{=20=0A!=20=20=20=20=20return=20DRAWPASTE_CMD=3D=3Did=20||=20= FramePasteCmd::IsA(id);=0A=20=20}=0A=20=20=0A!=20= DrawPasteCmd::DrawPasteCmd=20(ControlInfo*=20c,=20Clipboard*=20cb)=20:=20= FramePasteCmd(c,=20cb)=20{=0A=20=20}=0A=20=20=0A!=20= DrawPasteCmd::DrawPasteCmd=20(Editor*=20ed,=20Clipboard*=20cb)=20:=20= FramePasteCmd(ed,=20cb)=20{=0A=20=20}=0A=20=20=0A!=20= DrawPasteCmd::~DrawPasteCmd=20()=20{=0A!=20}=0A!=20=0A!=20Command*=20= DrawPasteCmd::Copy=20()=20{=0A!=20=20=20=20=20Command*=20copy=20=3D=20= new=20DrawPasteCmd(CopyControlInfo(),=20DeepCopyClipboard());=0A=20=20=20= =20=20=20InitCopy(copy);=0A=20=20=20=20=20=20return=20copy;=0A=20=20}=0A=20= =20=0A!=20void=20DrawPasteCmd::Execute=20()=20{=0A!=20=20=20= if(!_executed)=20{=0A!=20=20=20=20=20Clipboard*=20cb=20=3D=20= GetClipboard();=0A!=20=20=20=20=20Iterator=20it;=0A!=20=20=20=20=20= cb->First(it);=0A!=20=20=20=20=20GraphicComp*=20gcomp=20=3D=20= cb->GetComp(it);=0A!=20=20=20=20=20cb->Next(it);=0A!=20=20=20=20=20= if(cb->Done(it)=20&&=20gcomp->IsA(DRAW_IDRAW_COMP)=20||=20= gcomp->IsA(FRAME_IDRAW_COMP))=0A!=20=20=20=20=20=20=20{=0A!=20=09= gcomp->First(it);=0A!=20=0A!=20=09/*=20move=20to=20background=20frame=20= */=0A!=20=09DrawEditor*=20ed=20=3D=20(DrawEditor*)GetEditor();=0A!=20=09= FrameNumberState*=20fnumstate=20=3D=20ed->framenumstate();=0A!=20=09int=20= origfnum=20=3D=20fnumstate->framenumber();=0A!=20=09int=20currfnum=20=3D=20= 0;=0A!=20=09Append(new=20MoveFrameCmd(ed,=20-origfnum,=20true=20/*=20= allowbg=20*/));=0A!=20=09=0A!=20=09/*=20paste=20contents=20of=20= background=20frame=20*/=0A!=20=09FrameComp*=20fcomp=20=3D=20(FrameComp*)=20= (gcomp->GetComp(it)->IsA(FRAME_COMP)=20?=20gcomp->GetComp(it)=20:=20= nil);=0A!=20=09if=20(fcomp)=20{=0A!=20=0A!=20=09=20=20= while(!gcomp->Done(it))=20{=0A!=20=09=20=20=20=20gcomp->Remove(it);=0A!=20= =09=20=20=20=20Clipboard*=20newcb=20=3D=20new=20Clipboard();=0A!=20=09=20= =20=20=20Iterator=20jt;=0A!=20=09=20=20=20=20fcomp->First(jt);=0A!=20=09=20= =20=20=20while(!fcomp->Done(jt))=20{=0A!=20=09=20=20=20=20=20=20= newcb->Append(fcomp->GetComp(jt));=0A!=20=09=20=20=20=20=20=20= fcomp->Remove(jt);=0A!=20=09=20=20=20=20}=0A!=20=09=20=20=20=20= Append(new=20PasteCmd(ed,=20newcb));=0A!=20=09=20=20=20=20delete=20= fcomp;=0A!=20=09=20=20=0A!=20=09=20=20/*=20while=20more=20frames=20move=20= to=20next=20frame=20and=20paste=20(create=20new=20frame=20if=20= necessary)=20*/=0A!=20=09=20=20=20=20if(!gcomp->Done(it))=20{=0A!=20=09=20= =20=20=20=20=20currfnum++;=0A!=20=09=20=20=20=20=20=20fcomp=20=3D=20= (FrameComp*)=20(gcomp->GetComp(it)->IsA(FRAME_COMP)=20?=20= gcomp->GetComp(it)=20:=20nil);=0A!=20=09=20=20=20=20=20=20= if(currfnum>=3Ded->NumFrames())=20=0A!=20=09=09Append(new=20= CreateMoveFrameCmd(ed));=0A!=20=09=20=20=20=20=20=20else=0A!=20=09=09= Append(new=20MoveFrameCmd(ed,=201,=20true=20/*=20allowbg=20*/));=0A!=20=09= =20=20=20=20}=0A!=20=09=20=20}=0A!=20=09}=0A!=20=0A!=20=09/*=20move=20to=20= original=20frame=20*/=0A!=20=09Append(new=20MoveFrameCmd(ed,=20= origfnum-currfnum,=20true=20/*=20allowbg=20*/));=0A!=20=20=20=20=20=20=20= }=0A!=20=20=20=20=20=0A!=20=20=20=20=20else=20{=0A!=20=20=20=20=20=20=20= Append(new=20PasteCmd(GetEditor(),=20cb->Copy()));=0A!=20=20=20=20=20=20=20= Iterator=20i;=0A!=20=20=20=20=20=20=20for=20(cb->First(i);=20= !cb->Done(i);=20cb->Next(i))=20{=0A!=20=20=20=20=20=20=20=20=20= GraphicComp*=20gcomp=20=3D=20cb->GetComp(i);=0A!=20=20=20=20=20=20=20=20=20= if=20(gcomp->IsA(EDGE_COMP))=20{=0A!=20=09=20=20EdgeComp*=20comp=20=3D=20= (EdgeComp*)gcomp;=0A!=20=09=20=20NodeComp*=20start=20=3D=20node(cb,=20= comp->GetStartNode());=0A!=20=09=20=20NodeComp*=20end=20=3D=20node(cb,=20= comp->GetEndNode());=0A!=20=09=20=20EdgeConnectCmd*=20cmd=20=3D=20new=20= EdgeConnectCmd(GetEditor(),=20comp,=20start,=20end);=0A!=20=09=20=20= Append(cmd);=0A!=20=20=20=20=20=20=20=20=20}=0A!=20=20=20=20=20=20=20}=0A= !=20=20=20=20=20}=0A!=20=20=20}=0A=20=20=20=20MacroCmd::Execute();=0A-=20= =20=20_executed=20=3D=201;=0A=20=20}=0A=20=20=0A---=2037,71=20----=0A=20=20= #include=20<Unidraw/clipboard.h>=0A=20=20#include=20<Unidraw/iterator.h>=0A= =20=20=0A!=20= /*************************************************************************= ****/=20=0A!=20CopyMoveGraphFrameCmd::CopyMoveGraphFrameCmd(ControlInfo*=20= i,=20boolean=20after)=0A!=20:=20CopyMoveFrameCmd(i,=20after)=0A!=20{=0A=20= =20}=0A=20=20=0A!=20CopyMoveGraphFrameCmd::CopyMoveGraphFrameCmd(Editor*=20= e,=20boolean=20after)=0A!=20:=20CopyMoveFrameCmd(e,=20after)=0A!=20{=0A=20= =20}=0A=20=20=0A!=20ClassId=20CopyMoveGraphFrameCmd::GetClassId()=20{=20= return=20COPYMOVEGRAPHFRAME_CMD;=20}=0A!=20boolean=20= CopyMoveGraphFrameCmd::IsA(ClassId=20id)=20{=0A!=20=20=20=20=20return=20= id=20=3D=3D=20COPYMOVEGRAPHFRAME_CMD=20||=20CopyMoveFrameCmd::IsA(id);=0A= =20=20}=0A=20=20=0A!=20Command*=20CopyMoveGraphFrameCmd::Copy()=20{=0A!=20= =20=20=20=20Command*=20copy=20=3D=20new=20= CopyMoveGraphFrameCmd(CopyControlInfo(),=20_after);=0A=20=20=20=20=20=20= InitCopy(copy);=0A=20=20=20=20=20=20return=20copy;=0A=20=20}=0A=20=20=0A= !=20void=20CopyMoveGraphFrameCmd::Execute()=20{=0A!=20=20=20FrameEditor*=20= ed=20=3D=20(FrameEditor*)GetEditor();=0A!=20=20=20Append(new=20= OvSlctAllCmd(ed));=0A!=20=20=20Append(new=20GraphCopyCmd(ed));=0A!=20=20=20= Append(new=20CreateFrameCmd(ed,=20_after));=0A!=20=20=20Append(new=20= MoveFrameCmd(ed,=20_after=20?=20+1=20:=20-1));=0A!=20=20=20Append(new=20= GraphPasteCmd(ed));=0A=20=20=20=20MacroCmd::Execute();=0A=20=20}=0A=20=20= =0AIndex:=20DrawServ/drawcmds.h=0Adiff=20-c=20DrawServ/drawcmds.h:1.1=20= DrawServ/drawcmds.h:1.2=0A***=20DrawServ/drawcmds.h:1.1=09Mon=20May=2018=20= 16:45:10=202009=0A---=20src/DrawServ/drawcmds.h=09Wed=20Aug=2026=20= 09:21:42=202009=0A***************=0A***=2027,46=20****=0A=20=20=0A=20=20= #include=20<FrameUnidraw/framecmds.h>=0A=20=20=0A!=20//:=20specialized=20= PasteCmd=20for=20DrawServ=0A!=20class=20DrawPasteCmd=20:=20public=20= FramePasteCmd=20{=0A=20=20public:=0A!=20=20=20=20=20= DrawPasteCmd(ControlInfo*,=20Clipboard*=20=3D=20nil);=0A!=20=20=20=20=20= DrawPasteCmd(Editor*=20=3D=20nil,=20Clipboard*=20=3D=20nil);=0A!=20=20=20= =20=20virtual=20~DrawPasteCmd();=0A=20=20=0A-=20=20=20=20=20virtual=20= void=20Execute();=0A-=20=0A-=20=20=20=20=20virtual=20Command*=20Copy();=0A= =20=20=20=20=20=20virtual=20ClassId=20GetClassId();=0A=20=20=20=20=20=20= virtual=20boolean=20IsA(ClassId);=0A!=20=0A!=20=20protected:=0A=20=20};=0A= =20=20=0A=20=20#endif=0A---=2027,43=20----=0A=20=20=0A=20=20#include=20= <FrameUnidraw/framecmds.h>=0A=20=20=0A!=20//:=20command=20to=20copy=20= contents=20of=20current=20frame=20to=20create=20a=20new=20frame=20and=20= reconnect=20graph.=0A!=20class=20CopyMoveGraphFrameCmd=20:=20public=20= CopyMoveFrameCmd=20{=0A=20=20public:=0A!=20=20=20=20=20= CopyMoveGraphFrameCmd(ControlInfo*,=20boolean=20after=20=3D=20true);=0A!=20= =20=20=20=20CopyMoveGraphFrameCmd(Editor*=20=3D=20nil,=20boolean=20after=20= =3D=20true);=0A=20=20=0A=20=20=20=20=20=20virtual=20ClassId=20= GetClassId();=0A=20=20=20=20=20=20virtual=20boolean=20IsA(ClassId);=0A!=20= =20=20=20=20virtual=20Command*=20Copy();=0A!=20=20=20=20=20virtual=20= void=20Execute();=0A!=20protected:=0A=20=20};=0A=20=20=0A=20=20#endif=0A= Index:=20DrawServ/drawfunc.c=0Adiff=20-c=20DrawServ/drawfunc.c:1.2=20= DrawServ/drawfunc.c:1.3=0A***=20DrawServ/drawfunc.c:1.2=09Fri=20May=2016=20= 10:48:04=202008=0A---=20src/DrawServ/drawfunc.c=09Wed=20Aug=2026=20= 09:21:42=202009=0A***************=0A***=20150,157=20****=0A=20=20=20=20=0A= =20=20=20=20if=20(link)=20{=0A=20=20=20=20=20=20DrawLinkComp*=20linkcomp=20= =3D=20new=20DrawLinkComp(link);=0A!=20=20=20=20=20ComValue=20= result(DrawLinkComp::class_symid(),=20new=20OverlayView(linkcomp));=0A!=20= =20=20=20=20result.object_compview(true);=0A=20=20=20=20=20=20= push_stack(result);=0A=20=20=20=20}=0A=20=20=20=20else=0A---=20150,156=20= ----=0A=20=20=20=20=0A=20=20=20=20if=20(link)=20{=0A=20=20=20=20=20=20= DrawLinkComp*=20linkcomp=20=3D=20new=20DrawLinkComp(link);=0A!=20=20=20=20= =20ComValue=20result(new=20OverlayViewRef(linkcomp),=20= DrawLinkComp::class_symid());=0A=20=20=20=20=20=20push_stack(result);=0A=20= =20=20=20}=0A=20=20=20=20else=0AIndex:=20DrawServ/drawimport.c=0Adiff=20= -c=20DrawServ/drawimport.c:1.1=20DrawServ/drawimport.c:1.2=0A***=20= DrawServ/drawimport.c:1.1=09Mon=20May=2018=2016:45:10=202009=0A---=20= src/DrawServ/drawimport.c=09Wed=20Aug=2026=2009:21:42=202009=0A= ***************=0A***=2030,41=20****=0A---=2030,45=20----=0A=20=20=0A=20=20= #include=20<DrawServ/drawcatalog.h>=0A=20=20#include=20= <DrawServ/drawcmds.h>=0A+=20#include=20<DrawServ/draweditor.h>=0A=20=20= #include=20<DrawServ/drawimport.h>=0A=20=20#include=20= <DrawServ/drawclasses.h>=0A=20=20#include=20<DrawServ/drawcatalog.h>=0A=20= =20=0A=20=20#include=20<FrameUnidraw/framecmds.h>=0A+=20#include=20= <FrameUnidraw/framecomps.h>=0A+=20#include=20= <FrameUnidraw/framestates.h>=0A=20=20=0A+=20#include=20= <GraphUnidraw/edgecomp.h>=0A=20=20#include=20= <GraphUnidraw/graphcatalog.h>=0A=20=20#include=20= <GraphUnidraw/graphcomp.h>=0A=20=20#include=20<GraphUnidraw/graphcmds.h>=0A= ***************=0A***=2077,83=20****=0A=20=20=0A=20=20=20=20=20=20= Clipboard*=20cb;=0A=20=20=20=20=20=20if=20(comps=20!=3D=20nil)=20{=0A!=20= =20=20=20=20=20=20DrawPasteCmd*=20paste_cmd=20=3D=20new=20= DrawPasteCmd(GetEditor(),=20new=20Clipboard(comps));=0A=20=20=20=20=20=20= =20=20paste_cmd->Execute();=0A=20=20=20=20=20=20=20=20paste_cmd->Log();=0A= =20=20=20=20=20=20=20=20=0A---=2081,87=20----=0A=20=20=0A=20=20=20=20=20=20= Clipboard*=20cb;=0A=20=20=20=20=20=20if=20(comps=20!=3D=20nil)=20{=0A!=20= =20=20=20=20=20=20DrawImportPasteCmd*=20paste_cmd=20=3D=20new=20= DrawImportPasteCmd(GetEditor(),=20new=20Clipboard(comps));=0A=20=20=20=20= =20=20=20=20paste_cmd->Execute();=0A=20=20=20=20=20=20=20=20= paste_cmd->Log();=0A=20=20=20=20=20=20=20=20=0A***************=0A***=20= 134,136=20****=0A---=20138,250=20----=0A=20=20=20=20}=20else=20=0A=20=20=20= =20=20=20return=20FrameImportCmd::Import(pathname);=0A=20=20}=0A+=20=0A+=20= /*************************************************************************= ****/=0A+=20=0A+=20static=20NodeComp*=20node=20(Clipboard*=20cb,=20int=20= index)=20{=0A+=20=20=20=20=20if=20(index=20=3D=3D=20-1)=0A+=20=09return=20= nil;=0A+=20=0A+=20=20=20=20=20Iterator=20i;=0A+=20=20=20=20=20int=20= count=20=3D=20-1;=0A+=20=20=20=20=20for=20(cb->First(i);=20!cb->Done(i);=20= cb->Next(i))=20{=0A+=20=09GraphicComp*=20gcomp=20=3D=20cb->GetComp(i);=0A= +=20=09if=20(gcomp->IsA(NODE_COMP))=20{=0A+=20=09=20=20=20=20count++;=0A= +=20=09=20=20=20=20if=20(count=20=3D=3D=20index)=0A+=20=09=20=20=20=20=20= =20=20=20return=20(NodeComp*)gcomp;=0A+=20=20=20=20=20=20=20=20=20}=0A+=20= =20=20=20=20}=0A+=20=20=20=20=20return=20nil;=0A+=20}=0A+=20=0A+=20= ClassId=20DrawImportPasteCmd::GetClassId=20()=20{=20return=20= DRAWIMPORTPASTE_CMD;=20}=0A+=20=0A+=20boolean=20DrawImportPasteCmd::IsA=20= (ClassId=20id)=20{=20=0A+=20=20=20=20=20return=20DRAWIMPORTPASTE_CMD=3D=3D= id=20||=20FrameImportPasteCmd::IsA(id);=0A+=20}=0A+=20=0A+=20= DrawImportPasteCmd::DrawImportPasteCmd=20(ControlInfo*=20c,=20Clipboard*=20= cb)=20:=20FrameImportPasteCmd(c,=20cb)=20{=0A+=20}=0A+=20=0A+=20= DrawImportPasteCmd::DrawImportPasteCmd=20(Editor*=20ed,=20Clipboard*=20= cb)=20:=20FrameImportPasteCmd(ed,=20cb)=20{=0A+=20}=0A+=20=0A+=20= DrawImportPasteCmd::~DrawImportPasteCmd=20()=20{=0A+=20}=0A+=20=0A+=20= Command*=20DrawImportPasteCmd::Copy=20()=20{=0A+=20=20=20=20=20Command*=20= copy=20=3D=20new=20DrawImportPasteCmd(CopyControlInfo(),=20= DeepCopyClipboard());=0A+=20=20=20=20=20InitCopy(copy);=0A+=20=20=20=20=20= return=20copy;=0A+=20}=0A+=20=0A+=20void=20DrawImportPasteCmd::Execute=20= ()=20{=0A+=20=20=20if(!_executed)=20{=0A+=20=20=20=20=20Clipboard*=20cb=20= =3D=20GetClipboard();=0A+=20=20=20=20=20Iterator=20it;=0A+=20=20=20=20=20= cb->First(it);=0A+=20=20=20=20=20GraphicComp*=20gcomp=20=3D=20= cb->GetComp(it);=0A+=20=20=20=20=20cb->Next(it);=0A+=20=20=20=20=20= if(cb->Done(it)=20&&=20gcomp->IsA(DRAW_IDRAW_COMP)=20||=20= gcomp->IsA(FRAME_IDRAW_COMP))=0A+=20=20=20=20=20=20=20{=0A+=20=09= gcomp->First(it);=0A+=20=0A+=20=09/*=20move=20to=20background=20frame=20= */=0A+=20=09DrawEditor*=20ed=20=3D=20(DrawEditor*)GetEditor();=0A+=20=09= FrameNumberState*=20fnumstate=20=3D=20ed->framenumstate();=0A+=20=09int=20= origfnum=20=3D=20fnumstate->framenumber();=0A+=20=09int=20currfnum=20=3D=20= 0;=0A+=20=09Append(new=20MoveFrameCmd(ed,=20-origfnum,=20true=20/*=20= allowbg=20*/));=0A+=20=09=0A+=20=09/*=20paste=20contents=20of=20= background=20frame=20*/=0A+=20=09FrameComp*=20fcomp=20=3D=20(FrameComp*)=20= (gcomp->GetComp(it)->IsA(FRAME_COMP)=20?=20gcomp->GetComp(it)=20:=20= nil);=0A+=20=09if=20(fcomp)=20{=0A+=20=0A+=20=09=20=20= while(!gcomp->Done(it))=20{=0A+=20=09=20=20=20=20gcomp->Remove(it);=0A+=20= =09=20=20=20=20Clipboard*=20newcb=20=3D=20new=20Clipboard();=0A+=20=09=20= =20=20=20Iterator=20jt;=0A+=20=09=20=20=20=20fcomp->First(jt);=0A+=20=09=20= =20=20=20while(!fcomp->Done(jt))=20{=0A+=20=09=20=20=20=20=20=20= newcb->Append(fcomp->GetComp(jt));=0A+=20=09=20=20=20=20=20=20= fcomp->Remove(jt);=0A+=20=09=20=20=20=20}=0A+=20=09=20=20=20=20= Append(new=20PasteCmd(ed,=20newcb));=0A+=20=09=20=20=20=20delete=20= fcomp;=0A+=20=09=20=20=0A+=20=09=20=20/*=20while=20more=20frames=20move=20= to=20next=20frame=20and=20paste=20(create=20new=20frame=20if=20= necessary)=20*/=0A+=20=09=20=20=20=20if(!gcomp->Done(it))=20{=0A+=20=09=20= =20=20=20=20=20currfnum++;=0A+=20=09=20=20=20=20=20=20fcomp=20=3D=20= (FrameComp*)=20(gcomp->GetComp(it)->IsA(FRAME_COMP)=20?=20= gcomp->GetComp(it)=20:=20nil);=0A+=20=09=20=20=20=20=20=20= if(currfnum>=3Ded->NumFrames())=20=0A+=20=09=09Append(new=20= CreateMoveFrameCmd(ed));=0A+=20=09=20=20=20=20=20=20else=0A+=20=09=09= Append(new=20MoveFrameCmd(ed,=201,=20true=20/*=20allowbg=20*/));=0A+=20=09= =20=20=20=20}=0A+=20=09=20=20}=0A+=20=09}=0A+=20=0A+=20=09/*=20move=20to=20= original=20frame=20*/=0A+=20=09Append(new=20MoveFrameCmd(ed,=20= origfnum-currfnum,=20true=20/*=20allowbg=20*/));=0A+=20=20=20=20=20=20=20= }=0A+=20=20=20=20=20=0A+=20=20=20=20=20else=20{=0A+=20=20=20=20=20=20=20= Append(new=20PasteCmd(GetEditor(),=20cb->Copy()));=0A+=20=20=20=20=20=20=20= Iterator=20i;=0A+=20=20=20=20=20=20=20for=20(cb->First(i);=20= !cb->Done(i);=20cb->Next(i))=20{=0A+=20=20=20=20=20=20=20=20=20= GraphicComp*=20gcomp=20=3D=20cb->GetComp(i);=0A+=20=20=20=20=20=20=20=20=20= if=20(gcomp->IsA(EDGE_COMP))=20{=0A+=20=09=20=20EdgeComp*=20comp=20=3D=20= (EdgeComp*)gcomp;=0A+=20=09=20=20NodeComp*=20start=20=3D=20node(cb,=20= comp->GetStartNode());=0A+=20=09=20=20NodeComp*=20end=20=3D=20node(cb,=20= comp->GetEndNode());=0A+=20=09=20=20EdgeConnectCmd*=20cmd=20=3D=20new=20= EdgeConnectCmd(GetEditor(),=20comp,=20start,=20end);=0A+=20=09=20=20= Append(cmd);=0A+=20=20=20=20=20=20=20=20=20}=0A+=20=20=20=20=20=20=20}=0A= +=20=20=20=20=20}=0A+=20=20=20}=0A+=20=20=20MacroCmd::Execute();=0A+=20=20= =20_executed=20=3D=201;=0A+=20}=0A+=20=0AIndex:=20DrawServ/drawimport.h=0A= diff=20-c=20DrawServ/drawimport.h:1.1=20DrawServ/drawimport.h:1.2=0A***=20= DrawServ/drawimport.h:1.1=09Mon=20May=2018=2016:45:10=202009=0A---=20= src/DrawServ/drawimport.h=09Wed=20Aug=2026=2009:21:42=202009=0A= ***************=0A***=2048,51=20****=0A---=2048,67=20----=0A=20=20=20=20=20= =20virtual=20GraphicComp*=20Import(const=20char*);=0A=20=20};=0A=20=20=0A= +=20//:=20specialized=20ImportPasteCmd=20for=20DrawServ=0A+=20class=20= DrawImportPasteCmd=20:=20public=20FrameImportPasteCmd=20{=0A+=20public:=0A= +=20=20=20=20=20DrawImportPasteCmd(ControlInfo*,=20Clipboard*=20=3D=20= nil);=0A+=20=20=20=20=20DrawImportPasteCmd(Editor*=20=3D=20nil,=20= Clipboard*=20=3D=20nil);=0A+=20=20=20=20=20virtual=20= ~DrawImportPasteCmd();=0A+=20=0A+=20=20=20=20=20virtual=20void=20= Execute();=0A+=20=0A+=20=20=20=20=20virtual=20Command*=20Copy();=0A+=20=20= =20=20=20virtual=20ClassId=20GetClassId();=0A+=20=20=20=20=20virtual=20= boolean=20IsA(ClassId);=0A+=20=0A+=20=20protected:=0A+=20};=0A+=20=0A=20=20= #endif=0AIndex:=20DrawServ/drawkit.c=0Adiff=20-c=20= DrawServ/drawkit.c:1.4=20DrawServ/drawkit.c:1.5=0A***=20= DrawServ/drawkit.c:1.4=09Mon=20May=2018=2016:43:01=202009=0A---=20= src/DrawServ/drawkit.c=09Wed=20Aug=2026=2009:21:42=202009=0A= ***************=0A***=2028,33=20****=0A---=2028,34=20----=0A=20=20=20*/=0A= =20=20=0A=20=20#include=20<DrawServ/drawkit.h>=0A+=20#include=20= <DrawServ/drawcmds.h>=0A=20=20#include=20<DrawServ/drawcomps.h>=0A=20=20= #include=20<DrawServ/draweditor.h>=0A=20=20#include=20= <DrawServ/drawimport.h>=0A***************=0A***=20224,229=20****=0A---=20= 225,295=20----=0A=20=20=20=20=20=20return=20mbi;=0A=20=20}=0A=20=20=0A+=20= MenuItem*=20DrawKit::MakeFrameMenu()=20{=0A+=20=20=20=20=20LayoutKit&=20= lk=20=3D=20*LayoutKit::instance();=0A+=20=20=20=20=20WidgetKit&=20kit=20= =3D=20*WidgetKit::instance();=0A+=20=20=20=20=20=0A+=20=20=20=20=20= MenuItem=20*mbi=20=3D=20kit.menubar_item(kit.label("Frame"));=0A+=20=20=20= =20=20mbi->menu(kit.pulldown());=0A+=20=0A+=20=20=20=20=20= MoveFrameCmd::default_instance=0A+=20=20=20=20=20=20=20(new=20= MoveFrameCmd(new=20ControlInfo("Move=20Forward","^F","=06"),=20+1));=0A+=20= =20=20=20=20MakeMenu(mbi,=20MoveFrameCmd::default_instance(),=0A+=20=09=20= =20=20=20=20"Move=20Forward=20=20=20");=0A+=20=0A+=20=20=20=20=20= MakeMenu(mbi,=20new=20MoveFrameCmd(new=20ControlInfo("Move=20= Backward","^B","=02"),=20-1),=0A+=20=09=20=20=20=20=20"Move=20Backward=20= =20=20");=0A+=20=20=20=20=20MakeMenu(mbi,=20new=20FrameBeginCmd(new=20= ControlInfo("Goto=20First=20Frame")),=0A+=20=09=20=20=20=20=20"Goto=20= First=20Frame");=0A+=20=20=20=20=20MakeMenu(mbi,=20new=20FrameEndCmd(new=20= ControlInfo("Goto=20Last=20Frame")),=0A+=20=09=20=20=20=20=20"Goto=20= Last=20Frame=20");=0A+=20=20=20=20=20= mbi->menu()->append_item(kit.menu_item_separator());=0A+=20=20=20=20=20= MakeMenu(mbi,=20new=20CreateMoveFrameCmd(new=20ControlInfo("New=20= Forward","F","F")),=0A+=20=09=20=20=20=20=20"New=20Forward=20=20=20=20= ");=0A+=20=20=20=20=20MakeMenu(mbi,=20new=20CreateMoveFrameCmd(new=20= ControlInfo("New=20Backward","B","B"),=20false),=0A+=20=09=20=20=20=20=20= "New=20Backward=20=20=20");=0A+=20=20=20=20=20MakeMenu(mbi,=20new=20= CopyMoveGraphFrameCmd(new=20ControlInfo("Copy=20Forward","X","X")),=0A+=20= =09=20=20=20=20=20"Copy=20Forward=20=20=20");=0A+=20=20=20=20=20= MakeMenu(mbi,=20new=20CopyMoveGraphFrameCmd(new=20ControlInfo("Copy=20= Backward","Y","Y"),=20false),=0A+=20=09=20=20=20=20=20"Copy=20Backward=20= =20");=0A+=20=20=20=20=20MakeMenu(mbi,=20new=20DeleteFrameCmd(new=20= ControlInfo("Delete","D","D")),=0A+=20=09=20=20=20=20=20"Delete=20=20");=0A= +=20=20=20=20=20mbi->menu()->append_item(kit.menu_item_separator());=0A+=20= =20=20=20=20MakeMenu(mbi,=20new=20ShowOtherFrameCmd(new=20= ControlInfo("Show=20Prev=20Frame","",""),=20-1),=0A+=20=09=20=20=20=20=20= "Show=20Prev=20Frame");=0A+=20=20=20=20=20MakeMenu(mbi,=20new=20= ShowOtherFrameCmd(new=20ControlInfo("Hide=20Prev=20Frame","",""),=200),=0A= +=20=09=20=20=20=20=20"Hide=20Prev=20Frame");=0A+=20=0A+=20=20=20=20=20= MenuItem*=20menu_item;=0A+=20=20=20=20=20menu_item=20=3D=20= kit.menu_item(kit.label("Enable=20Looping"));=0A+=20=20=20=20=20= menu_item->action=0A+=20=20=20=20=20=20=20(new=20= ActionCallback(MoveFrameCmd)=0A+=20=20=20=20=20=20=20=20= (MoveFrameCmd::default_instance(),=20&MoveFrameCmd::set_wraparound));=0A= +=20=20=20=20=20mbi->menu()->append_item(menu_item);=0A+=20=0A+=20=20=20=20= =20menu_item=20=3D=20kit.menu_item(kit.label("Disable=20Looping"));=0A+=20= =20=20=20=20menu_item->action=0A+=20=20=20=20=20=20=20(new=20= ActionCallback(MoveFrameCmd)=0A+=20=20=20=20=20=20=20=20= (MoveFrameCmd::default_instance(),=20&MoveFrameCmd::clr_wraparound));=0A= +=20=20=20=20=20mbi->menu()->append_item(menu_item);=0A+=20=0A+=20#if=20= 0=0A+=20=20=20=20=20MakeMenu(mbi,=20new=20AutoNewFrameCmd(new=20= ControlInfo("Toggle=20Auto=20New=20Frame",=0A+=20=09=09=09=09=09=09=20=20= =20=20=20=20"","")),=0A+=20=09=20=20=20=20=20"Toggle=20Auto=20New=20= Frame");=0A+=20#else=0A+=20=20=20=20=20menu_item=20=3D=20= kit.check_menu_item(kit.label("Auto=20New=20Frame"));=0A+=20=20=20=20=20= menu_item->state()->set(TelltaleState::is_chosen,=20= ((FrameEditor*)GetEditor())->AutoNewFrame());=0A+=20=20=20=20=20= ((FrameEditor*)GetEditor())->_autonewframe_tts=20=3D=20= menu_item->state();=0A+=20=20=20=20=20= AutoNewFrameCmd::default_instance(new=20AutoNewFrameCmd(GetEditor()));=0A= +=20=20=20=20=20menu_item->action=0A+=20=20=20=20=20=20=20(new=20= ActionCallback(AutoNewFrameCmd)=0A+=20=20=20=20=20=20=20=20= (AutoNewFrameCmd::default_instance(),=20&AutoNewFrameCmd::Execute));=0A+=20= =20=20=20=20mbi->menu()->append_item(menu_item);=0A+=20#endif=0A+=20=20=20= =20=20return=20mbi;=0A+=20}=0A+=20=0A=20=20MenuItem=20*=20= DrawKit::MakeToolsMenu()=20{=0A=20=20=20=20=20=20LayoutKit&=20lk=20=3D=20= *LayoutKit::instance();=0A=20=20=20=20=20=20WidgetKit&=20kit=20=3D=20= *WidgetKit::instance();=0AIndex:=20DrawServ/drawkit.h=0Adiff=20-c=20= DrawServ/drawkit.h:1.2=20DrawServ/drawkit.h:1.3=0A***=20= DrawServ/drawkit.h:1.2=09Sun=20Sep=2023=2009:11:36=202007=0A---=20= src/DrawServ/drawkit.h=09Wed=20Aug=2026=2009:21:42=202009=0A= ***************=0A***=2045,50=20****=0A---=2045,51=20----=0A=20=20=20=20=20= =20virtual=20MenuItem=20*MakeFileMenu();=0A=20=20=20=20=20=20virtual=20= MenuItem=20*MakeEditMenu();=0A=20=20=20=20=20=20virtual=20Glyph*=20= MakeToolbar();=0A+=20=20=20=20=20virtual=20MenuItem*=20MakeFrameMenu();=0A= =20=20=20=20=20=20virtual=20MenuItem*=20MakeToolsMenu();=0A=20=20=20=20=20= =20virtual=20MenuItem*=20MakeViewersMenu();=0A=20=20=0AIndex:=20= FrameUnidraw/frameclasses.h=0Adiff=20-c=20= FrameUnidraw/frameclasses.h:1.2=20FrameUnidraw/frameclasses.h:1.3=0A***=20= FrameUnidraw/frameclasses.h:1.2=09Mon=20May=2018=2016:42:59=202009=0A---=20= src/FrameUnidraw/frameclasses.h=09Wed=20Aug=2026=2009:21:40=202009=0A= ***************=0A***=2050,56=20****=0A=20=20#define=20= SHOWOTHERFRAME_CMD=20=208070=0A=20=20#define=20AUTONEWFRAME_CMD=20=20=20=20= 8071=0A=20=20#define=20FRAMEIMPORT_CMD=20=20=20=20=208072=0A!=20#define=20= FRAMEPASTE_CMD=20=20=20=20=20=208073=0A=20=20=0A=20=20#define=20= FRAME_OVERLAYS_VIEW=20=20=20Combine(FRAME_OVERLAYS_COMP,=20= COMPONENT_VIEW)=0A=20=20#define=20FRAME_VIEW=20=20=20=20=20=20=20=20=20=20= =20=20Combine(FRAME_COMP,=20COMPONENT_VIEW)=0A---=2050,56=20----=0A=20=20= #define=20SHOWOTHERFRAME_CMD=20=208070=0A=20=20#define=20= AUTONEWFRAME_CMD=20=20=20=208071=0A=20=20#define=20FRAMEIMPORT_CMD=20=20=20= =20=208072=0A!=20#define=20FRAMEIMPORTPASTE_CMD=208073=0A=20=20=0A=20=20= #define=20FRAME_OVERLAYS_VIEW=20=20=20Combine(FRAME_OVERLAYS_COMP,=20= COMPONENT_VIEW)=0A=20=20#define=20FRAME_VIEW=20=20=20=20=20=20=20=20=20=20= =20=20Combine(FRAME_COMP,=20COMPONENT_VIEW)=0AIndex:=20= FrameUnidraw/framecmds.c=0Adiff=20-c=20FrameUnidraw/framecmds.c:1.3=20= FrameUnidraw/framecmds.c:1.4=0A***=20FrameUnidraw/framecmds.c:1.3=09Mon=20= May=2018=2016:42:59=202009=0A---=20src/FrameUnidraw/framecmds.c=09Wed=20= Aug=2026=2009:21:40=202009=0A***************=0A***=20415,421=20****=0A=20= =20=0A=20=20ClassId=20CreateMoveFrameCmd::GetClassId()=20{=20return=20= CREATEMOVEFRAME_CMD;=20}=0A=20=20boolean=20= CreateMoveFrameCmd::IsA(ClassId=20id)=20{=0A!=20=20=20=20=20return=20id=20= =3D=3D=20CREATEMOVEFRAME_CMD=20||=20Command::IsA(id);=0A=20=20}=0A=20=20=0A= =20=20Command*=20CreateMoveFrameCmd::Copy()=20{=0A---=20415,421=20----=0A= =20=20=0A=20=20ClassId=20CreateMoveFrameCmd::GetClassId()=20{=20return=20= CREATEMOVEFRAME_CMD;=20}=0A=20=20boolean=20= CreateMoveFrameCmd::IsA(ClassId=20id)=20{=0A!=20=20=20=20=20return=20id=20= =3D=3D=20CREATEMOVEFRAME_CMD=20||=20MacroCmd::IsA(id);=0A=20=20}=0A=20=20= =0A=20=20Command*=20CreateMoveFrameCmd::Copy()=20{=0A***************=0A= ***=20447,453=20****=0A=20=20=0A=20=20ClassId=20= CopyMoveFrameCmd::GetClassId()=20{=20return=20COPYMOVEFRAME_CMD;=20}=0A=20= =20boolean=20CopyMoveFrameCmd::IsA(ClassId=20id)=20{=0A!=20=20=20=20=20= return=20id=20=3D=3D=20COPYMOVEFRAME_CMD=20||=20Command::IsA(id);=0A=20=20= }=0A=20=20=0A=20=20Command*=20CopyMoveFrameCmd::Copy()=20{=0A---=20= 447,453=20----=0A=20=20=0A=20=20ClassId=20CopyMoveFrameCmd::GetClassId()=20= {=20return=20COPYMOVEFRAME_CMD;=20}=0A=20=20boolean=20= CopyMoveFrameCmd::IsA(ClassId=20id)=20{=0A!=20=20=20=20=20return=20id=20= =3D=3D=20COPYMOVEFRAME_CMD=20||=20MacroCmd::IsA(id);=0A=20=20}=0A=20=20=0A= =20=20Command*=20CopyMoveFrameCmd::Copy()=20{=0A***************=0A***=20= 806,812=20****=0A=20=20=0A=20=20ClassId=20AutoNewFrameCmd::GetClassId()=20= {=20return=20AUTONEWFRAME_CMD;=20}=0A=20=20boolean=20= AutoNewFrameCmd::IsA(ClassId=20id)=20{=0A!=20=20=20=20=20return=20id=20= =3D=3D=20AUTONEWFRAME_CMD=20||=20Command::IsA(id);=0A=20=20}=0A=20=20=0A=20= =20Command*=20AutoNewFrameCmd::Copy()=20{=0A---=20806,812=20----=0A=20=20= =0A=20=20ClassId=20AutoNewFrameCmd::GetClassId()=20{=20return=20= AUTONEWFRAME_CMD;=20}=0A=20=20boolean=20AutoNewFrameCmd::IsA(ClassId=20= id)=20{=0A!=20=20=20=20=20return=20id=20=3D=3D=20AUTONEWFRAME_CMD=20||=20= MacroCmd::IsA(id);=0A=20=20}=0A=20=20=0A=20=20Command*=20= AutoNewFrameCmd::Copy()=20{=0A***************=0A***=20834,920=20****=0A=20= =20=0A=20=20implementActionCallback(AutoNewFrameCmd)=0A=20=20=0A-=20= /*************************************************************************= ****/=0A-=20=0A-=20ClassId=20FramePasteCmd::GetClassId=20()=20{=20return=20= FRAMEPASTE_CMD;=20}=0A-=20=0A-=20boolean=20FramePasteCmd::IsA=20(ClassId=20= id)=20{=20=0A-=20=20=20=20=20return=20FRAMEPASTE_CMD=3D=3Did=20||=20= MacroCmd::IsA(id);=0A-=20}=0A-=20=0A-=20FramePasteCmd::FramePasteCmd=20= (ControlInfo*=20c,=20Clipboard*=20cb)=20:=20MacroCmd(c)=20{=0A-=20=20=20=20= =20SetClipboard(cb);=0A-=20=20=20=20=20_executed=20=3D=200;=0A-=20}=0A-=20= =0A-=20FramePasteCmd::FramePasteCmd=20(Editor*=20ed,=20Clipboard*=20cb)=20= :=20MacroCmd(ed)=20{=0A-=20=20=20=20=20SetClipboard(cb);=0A-=20=20=20=20=20= _executed=20=3D=200;=0A-=20}=0A-=20=0A-=20FramePasteCmd::~FramePasteCmd=20= ()=20{=0A-=20}=0A-=20=0A-=20Command*=20FramePasteCmd::Copy=20()=20{=0A-=20= =20=20=20=20Command*=20copy=20=3D=20new=20= FramePasteCmd(CopyControlInfo(),=20DeepCopyClipboard());=0A-=20=20=20=20=20= InitCopy(copy);=0A-=20=20=20=20=20return=20copy;=0A-=20}=0A-=20=0A-=20= void=20FramePasteCmd::Execute=20()=20{=0A-=20=20=20if(!_executed)=20{=0A= -=20=20=20=20=20Clipboard*=20cb=20=3D=20GetClipboard();=0A-=20=20=20=20=20= Iterator=20it;=0A-=20=20=20=20=20cb->First(it);=0A-=20=20=20=20=20= GraphicComp*=20gcomp=20=3D=20cb->GetComp(it);=0A-=20=20=20=20=20= cb->Next(it);=0A-=20=20=20=20=20if(cb->Done(it)=20&&=20= gcomp->IsA(FRAME_IDRAW_COMP))=0A-=20=20=20=20=20=20=20{=0A-=20=09= gcomp->First(it);=0A-=20=0A-=20=09/*=20move=20to=20background=20frame=20= */=0A-=20=09FrameEditor*=20ed=20=3D=20(FrameEditor*)GetEditor();=0A-=20=09= FrameNumberState*=20fnumstate=20=3D=20ed->framenumstate();=0A-=20=09int=20= origfnum=20=3D=20fnumstate->framenumber();=0A-=20=09int=20currfnum=20=3D=20= 0;=0A-=20=09Append(new=20MoveFrameCmd(ed,=20-origfnum,=20true=20/*=20= allowbg=20*/));=0A-=20=09=0A-=20=09/*=20paste=20contents=20of=20= background=20frame=20*/=0A-=20=09FrameComp*=20fcomp=20=3D=20(FrameComp*)=20= (gcomp->GetComp(it)->IsA(FRAME_COMP)=20?=20gcomp->GetComp(it)=20:=20= nil);=0A-=20=09if=20(fcomp)=20{=0A-=20=0A-=20=09=20=20= while(!gcomp->Done(it))=20{=0A-=20=09=20=20=20=20gcomp->Remove(it);=0A-=20= =09=20=20=20=20Clipboard*=20newcb=20=3D=20new=20Clipboard();=0A-=20=09=20= =20=20=20Iterator=20jt;=0A-=20=09=20=20=20=20fcomp->First(jt);=0A-=20=09=20= =20=20=20while(!fcomp->Done(jt))=20{=0A-=20=09=20=20=20=20=20=20= newcb->Append(fcomp->GetComp(jt));=0A-=20=09=20=20=20=20=20=20= fcomp->Remove(jt);=0A-=20=09=20=20=20=20}=0A-=20=09=20=20=20=20= Append(new=20PasteCmd(ed,=20newcb));=0A-=20=09=20=20=20=20delete=20= fcomp;=0A-=20=09=20=20=0A-=20=09=20=20/*=20while=20more=20frames=20move=20= to=20next=20frame=20and=20paste=20(create=20new=20frame=20if=20= necessary)=20*/=0A-=20=09=20=20=20=20if(!gcomp->Done(it))=20{=0A-=20=09=20= =20=20=20=20=20currfnum++;=0A-=20=09=20=20=20=20=20=20fcomp=20=3D=20= (FrameComp*)=20(gcomp->GetComp(it)->IsA(FRAME_COMP)=20?=20= gcomp->GetComp(it)=20:=20nil);=0A-=20=09=20=20=20=20=20=20= if(currfnum>=3Ded->NumFrames())=20=0A-=20=09=09Append(new=20= CreateMoveFrameCmd(ed));=0A-=20=09=20=20=20=20=20=20else=0A-=20=09=09= Append(new=20MoveFrameCmd(ed,=201,=20true=20/*=20allowbg=20*/));=0A-=20=09= =20=20=20=20}=0A-=20=09=20=20}=0A-=20=09}=0A-=20=0A-=20=09/*=20move=20to=20= original=20frame=20*/=0A-=20=09Append(new=20MoveFrameCmd(ed,=20= origfnum-currfnum,=20true=20/*=20allowbg=20*/));=0A-=20=20=20=20=20=20=20= }=0A-=20=20=20=20=20=0A-=20=20=20=20=20else=20=20=0A-=20=20=20=20=20=20=20= Append(new=20PasteCmd(GetEditor(),=20cb->Copy()));=0A-=20=20=20}=0A-=20=20= =20MacroCmd::Execute();=0A-=20=20=20_executed=20=3D=201;=0A-=20}=0A-=20=0A= ---=20834,836=20----=0AIndex:=20FrameUnidraw/framecmds.h=0Adiff=20-c=20= FrameUnidraw/framecmds.h:1.2=20FrameUnidraw/framecmds.h:1.3=0A***=20= FrameUnidraw/framecmds.h:1.2=09Mon=20May=2018=2016:42:59=202009=0A---=20= src/FrameUnidraw/framecmds.h=09Wed=20Aug=2026=2009:21:40=202009=0A= ***************=0A***=20326,346=20****=0A=20=20=0A=20=20= declareActionCallback(AutoNewFrameCmd)=0A=20=20=0A-=20//:=20specialized=20= PasteCmd=20for=20flipbook=0A-=20class=20FramePasteCmd=20:=20public=20= MacroCmd=20{=0A-=20public:=0A-=20=20=20=20=20FramePasteCmd(ControlInfo*,=20= Clipboard*=20=3D=20nil);=0A-=20=20=20=20=20FramePasteCmd(Editor*=20=3D=20= nil,=20Clipboard*=20=3D=20nil);=0A-=20=20=20=20=20virtual=20= ~FramePasteCmd();=0A-=20=0A-=20=20=20=20=20virtual=20void=20Execute();=0A= -=20=0A-=20=20=20=20=20virtual=20Command*=20Copy();=0A-=20=20=20=20=20= virtual=20ClassId=20GetClassId();=0A-=20=20=20=20=20virtual=20boolean=20= IsA(ClassId);=0A-=20=0A-=20=20protected:=0A-=20=20=20=20=20int=20= _executed;=0A-=20};=0A-=20=0A=20=20#endif=0A---=20326,329=20----=0A= Index:=20FrameUnidraw/frameeditor.h=0Adiff=20-c=20= FrameUnidraw/frameeditor.h:1.1=20FrameUnidraw/frameeditor.h:1.2=0A***=20= FrameUnidraw/frameeditor.h:1.1=09Wed=20Aug=2029=2010:38:56=202007=0A---=20= src/FrameUnidraw/frameeditor.h=09Wed=20Aug=2026=2009:21:40=202009=0A= ***************=0A***=20100,105=20****=0A---=20100,106=20----=0A=20=20=20= =20=20=20int=20_num_curr_others;=0A=20=20=20=20=20=20int=20= _num_prev_others;=0A=20=20=20=20=20=20boolean=20_autonewframe;=0A+=20= public:=0A=20=20=20=20=20=20TelltaleState*=20_autonewframe_tts;=0A=20=20=0A= =20=20friend=20class=20FrameKit;=0AIndex:=20FrameUnidraw/frameimport.c=0A= diff=20-c=20FrameUnidraw/frameimport.c:1.1=20= FrameUnidraw/frameimport.c:1.2=0A***=20FrameUnidraw/frameimport.c:1.1=09= Mon=20May=2018=2016:45:09=202009=0A---=20src/FrameUnidraw/frameimport.c=09= Wed=20Aug=2026=2009:21:40=202009=0A***************=0A***=2034,39=20****=0A= ---=2034,40=20----=0A=20=20#include=20<FrameUnidraw/framecmds.h>=0A=20=20= #include=20<FrameUnidraw/frameeditor.h>=0A=20=20#include=20= <FrameUnidraw/frameimport.h>=0A+=20#include=20= <FrameUnidraw/framestates.h>=0A=20=20=0A=20=20#include=20= <IVGlyph/importchooser.h>=0A=20=20=0A***************=0A***=2069,75=20= ****=0A=20=20=20=20=0A=20=20=20=20Clipboard*=20cb;=0A=20=20=20=20if=20= (comps=20!=3D=20nil)=20{=0A!=20=20=20=20=20FramePasteCmd*=20paste_cmd=20= =3D=20new=20FramePasteCmd(GetEditor(),=20new=20Clipboard(comps));=0A=20=20= =20=20=20=20paste_cmd->Execute();=0A=20=20=20=20=20=20paste_cmd->Log();=0A= =20=20=20=20=20=20=0A---=2070,76=20----=0A=20=20=20=20=0A=20=20=20=20= Clipboard*=20cb;=0A=20=20=20=20if=20(comps=20!=3D=20nil)=20{=0A!=20=20=20= =20=20FrameImportPasteCmd*=20paste_cmd=20=3D=20new=20= FrameImportPasteCmd(GetEditor(),=20new=20Clipboard(comps));=0A=20=20=20=20= =20=20paste_cmd->Execute();=0A=20=20=20=20=20=20paste_cmd->Log();=0A=20=20= =20=20=20=20=0A***************=0A***=20109,111=20****=0A---=20110,197=20= ----=0A=20=20=20=20=20=20}=20else=20=0A=20=20=20=20=20=20=20=20=20=20= return=20OvImportCmd::Import(pathname);=0A=20=20}=0A+=20=0A+=20= /*************************************************************************= ****/=0A+=20=0A+=20ClassId=20FrameImportPasteCmd::GetClassId=20()=20{=20= return=20FRAMEIMPORTPASTE_CMD;=20}=0A+=20=0A+=20boolean=20= FrameImportPasteCmd::IsA=20(ClassId=20id)=20{=20=0A+=20=20=20=20=20= return=20FRAMEIMPORTPASTE_CMD=3D=3Did=20||=20MacroCmd::IsA(id);=0A+=20}=0A= +=20=0A+=20FrameImportPasteCmd::FrameImportPasteCmd=20(ControlInfo*=20c,=20= Clipboard*=20cb)=20:=20MacroCmd(c)=20{=0A+=20=20=20=20=20= SetClipboard(cb);=0A+=20=20=20=20=20_executed=20=3D=200;=0A+=20}=0A+=20=0A= +=20FrameImportPasteCmd::FrameImportPasteCmd=20(Editor*=20ed,=20= Clipboard*=20cb)=20:=20MacroCmd(ed)=20{=0A+=20=20=20=20=20= SetClipboard(cb);=0A+=20=20=20=20=20_executed=20=3D=200;=0A+=20}=0A+=20=0A= +=20FrameImportPasteCmd::~FrameImportPasteCmd=20()=20{=0A+=20}=0A+=20=0A= +=20Command*=20FrameImportPasteCmd::Copy=20()=20{=0A+=20=20=20=20=20= Command*=20copy=20=3D=20new=20FrameImportPasteCmd(CopyControlInfo(),=20= DeepCopyClipboard());=0A+=20=20=20=20=20InitCopy(copy);=0A+=20=20=20=20=20= return=20copy;=0A+=20}=0A+=20=0A+=20void=20FrameImportPasteCmd::Execute=20= ()=20{=0A+=20=20=20if(!_executed)=20{=0A+=20=20=20=20=20Clipboard*=20cb=20= =3D=20GetClipboard();=0A+=20=20=20=20=20Iterator=20it;=0A+=20=20=20=20=20= cb->First(it);=0A+=20=20=20=20=20GraphicComp*=20gcomp=20=3D=20= cb->GetComp(it);=0A+=20=20=20=20=20cb->Next(it);=0A+=20=20=20=20=20= if(cb->Done(it)=20&&=20gcomp->IsA(FRAME_IDRAW_COMP))=0A+=20=20=20=20=20=20= =20{=0A+=20=09gcomp->First(it);=0A+=20=0A+=20=09/*=20move=20to=20= background=20frame=20*/=0A+=20=09FrameEditor*=20ed=20=3D=20= (FrameEditor*)GetEditor();=0A+=20=09FrameNumberState*=20fnumstate=20=3D=20= ed->framenumstate();=0A+=20=09int=20origfnum=20=3D=20= fnumstate->framenumber();=0A+=20=09int=20currfnum=20=3D=200;=0A+=20=09= Append(new=20MoveFrameCmd(ed,=20-origfnum,=20true=20/*=20allowbg=20*/));=0A= +=20=09=0A+=20=09/*=20paste=20contents=20of=20background=20frame=20*/=0A= +=20=09FrameComp*=20fcomp=20=3D=20(FrameComp*)=20= (gcomp->GetComp(it)->IsA(FRAME_COMP)=20?=20gcomp->GetComp(it)=20:=20= nil);=0A+=20=09if=20(fcomp)=20{=0A+=20=0A+=20=09=20=20= while(!gcomp->Done(it))=20{=0A+=20=09=20=20=20=20gcomp->Remove(it);=0A+=20= =09=20=20=20=20Clipboard*=20newcb=20=3D=20new=20Clipboard();=0A+=20=09=20= =20=20=20Iterator=20jt;=0A+=20=09=20=20=20=20fcomp->First(jt);=0A+=20=09=20= =20=20=20while(!fcomp->Done(jt))=20{=0A+=20=09=20=20=20=20=20=20= newcb->Append(fcomp->GetComp(jt));=0A+=20=09=20=20=20=20=20=20= fcomp->Remove(jt);=0A+=20=09=20=20=20=20}=0A+=20=09=20=20=20=20= Append(new=20PasteCmd(ed,=20newcb));=0A+=20=09=20=20=20=20delete=20= fcomp;=0A+=20=09=20=20=0A+=20=09=20=20/*=20while=20more=20frames=20move=20= to=20next=20frame=20and=20paste=20(create=20new=20frame=20if=20= necessary)=20*/=0A+=20=09=20=20=20=20if(!gcomp->Done(it))=20{=0A+=20=09=20= =20=20=20=20=20currfnum++;=0A+=20=09=20=20=20=20=20=20fcomp=20=3D=20= (FrameComp*)=20(gcomp->GetComp(it)->IsA(FRAME_COMP)=20?=20= gcomp->GetComp(it)=20:=20nil);=0A+=20=09=20=20=20=20=20=20= if(currfnum>=3Ded->NumFrames())=20=0A+=20=09=09Append(new=20= CreateMoveFrameCmd(ed));=0A+=20=09=20=20=20=20=20=20else=0A+=20=09=09= Append(new=20MoveFrameCmd(ed,=201,=20true=20/*=20allowbg=20*/));=0A+=20=09= =20=20=20=20}=0A+=20=09=20=20}=0A+=20=09}=0A+=20=0A+=20=09/*=20move=20to=20= original=20frame=20*/=0A+=20=09Append(new=20MoveFrameCmd(ed,=20= origfnum-currfnum,=20true=20/*=20allowbg=20*/));=0A+=20=20=20=20=20=20=20= }=0A+=20=20=20=20=20=0A+=20=20=20=20=20else=20=20=0A+=20=20=20=20=20=20=20= Append(new=20PasteCmd(GetEditor(),=20cb->Copy()));=0A+=20=20=20}=0A+=20=20= =20MacroCmd::Execute();=0A+=20=20=20_executed=20=3D=201;=0A+=20}=0A+=20=0A= Index:=20FrameUnidraw/frameimport.h=0Adiff=20-c=20= FrameUnidraw/frameimport.h:1.1=20FrameUnidraw/frameimport.h:1.2=0A***=20= FrameUnidraw/frameimport.h:1.1=09Mon=20May=2018=2016:45:09=202009=0A---=20= src/FrameUnidraw/frameimport.h=09Wed=20Aug=2026=2009:21:40=202009=0A= ***************=0A***=2032,37=20****=0A---=2032,38=20----=0A=20=20= #define=20frame_import_h=0A=20=20=0A=20=20#include=20= <OverlayUnidraw/ovimport.h>=0A+=20#include=20<Unidraw/Commands/macro.h>=0A= =20=20=0A=20=20#include=20<stdio.h>=0A=20=20=0A***************=0A***=20= 49,52=20****=0A---=2050,70=20----=0A=20=20=20=20=20=20virtual=20= GraphicComp*=20Import(const=20char*);=0A=20=20};=0A=20=20=0A+=20//:=20= specialized=20PasteCmd=20for=20flipbook=0A+=20class=20= FrameImportPasteCmd=20:=20public=20MacroCmd=20{=0A+=20public:=0A+=20=20=20= =20=20FrameImportPasteCmd(ControlInfo*,=20Clipboard*=20=3D=20nil);=0A+=20= =20=20=20=20FrameImportPasteCmd(Editor*=20=3D=20nil,=20Clipboard*=20=3D=20= nil);=0A+=20=20=20=20=20virtual=20~FrameImportPasteCmd();=0A+=20=0A+=20=20= =20=20=20virtual=20void=20Execute();=0A+=20=0A+=20=20=20=20=20virtual=20= Command*=20Copy();=0A+=20=20=20=20=20virtual=20ClassId=20GetClassId();=0A= +=20=20=20=20=20virtual=20boolean=20IsA(ClassId);=0A+=20=0A+=20=20= protected:=0A+=20=20=20=20=20int=20_executed;=0A+=20};=0A+=20=0A=20=20= #endif=0AIndex:=20GraphUnidraw/graphcmds.c=0Adiff=20-c=20= GraphUnidraw/graphcmds.c:1.3=20GraphUnidraw/graphcmds.c:1.4=0A***=20= GraphUnidraw/graphcmds.c:1.3=09Fri=20Sep=2028=2013:08:35=202007=0A---=20= src/GraphUnidraw/graphcmds.c=09Wed=20Aug=2026=2009:21:41=202009=0A= ***************=0A***=20199,212=20****=0A=20=20ClassId=20= GraphDeleteCmd::GetClassId=20()=20{=20return=20GRAPHDELETE_CMD;=20}=0A=20= =20=0A=20=20boolean=20GraphDeleteCmd::IsA=20(ClassId=20id)=20{=0A!=20=20=20= =20=20return=20GRAPHDELETE_CMD=20=3D=3D=20id=20||=20DeleteCmd::IsA(id);=0A= =20=20}=0A=20=20=0A!=20GraphDeleteCmd::GraphDeleteCmd=20(ControlInfo*=20= c,=20Clipboard*=20cb)=20:=20DeleteCmd(c,cb)=20{=0A=20=20=20=20=20=20= connections=20=3D=20new=20UList;=0A=20=20}=0A=20=20=0A!=20= GraphDeleteCmd::GraphDeleteCmd=20(Editor*=20ed,=20Clipboard*=20cb)=20:=20= DeleteCmd(ed,=20cb)=20{=0A=20=20=20=20=20=20connections=20=3D=20new=20= UList;=0A=20=20}=0A=20=20=0A---=20199,212=20----=0A=20=20ClassId=20= GraphDeleteCmd::GetClassId=20()=20{=20return=20GRAPHDELETE_CMD;=20}=0A=20= =20=0A=20=20boolean=20GraphDeleteCmd::IsA=20(ClassId=20id)=20{=0A!=20=20=20= =20=20return=20GRAPHDELETE_CMD=20=3D=3D=20id=20||=20= OvDeleteCmd::IsA(id);=0A=20=20}=0A=20=20=0A!=20= GraphDeleteCmd::GraphDeleteCmd=20(ControlInfo*=20c,=20Clipboard*=20cb)=20= :=20OvDeleteCmd(c,cb)=20{=0A=20=20=20=20=20=20connections=20=3D=20new=20= UList;=0A=20=20}=0A=20=20=0A!=20GraphDeleteCmd::GraphDeleteCmd=20= (Editor*=20ed,=20Clipboard*=20cb)=20:=20OvDeleteCmd(ed,=20cb)=20{=0A=20=20= =20=20=20=20connections=20=3D=20new=20UList;=0A=20=20}=0A=20=20=0A= ***************=0A***=20225,230=20****=0A---=20225,231=20----=0A=20=20= Command*=20GraphDeleteCmd::Copy=20()=20{=0A=20=20=20=20=20=20Command*=20= copy=20=3D=20new=20GraphDeleteCmd(CopyControlInfo());=0A=20=20=20=20=20=20= InitCopy(copy);=0A+=20=20=20=20=20= ((OvDeleteCmd*)copy)->Reversable(Reversable());=0A=20=20=20=20=20=20= return=20copy;=0A=20=20}=0A=20=20=0A***************=0A***=20284,290=20= ****=0A=20=20=20=20=20=20Editor*=20editor=20=3D=20GetEditor();=0A=20=20=20= =20=20=20Selection*=20s=20=3D=20editor->GetSelection();=0A=20=20=20=20=20= =20Clipboard*=20cb=20=3D=20new=20Clipboard();=0A!=20=20=20=20=20= GraphicView*=20views=20=3D=20editor->GetViewer()->GetGraphicView();=0A=20= =20=20=20=20=20s->Sort(views);=0A=20=20=20=20=20=20cb->CopyInit(s);=0A=20= =20=20=20=20=20index_clipboard(s,=20cb);=0A---=20285,291=20----=0A=20=20=20= =20=20=20Editor*=20editor=20=3D=20GetEditor();=0A=20=20=20=20=20=20= Selection*=20s=20=3D=20editor->GetSelection();=0A=20=20=20=20=20=20= Clipboard*=20cb=20=3D=20new=20Clipboard();=0A!=20=20=20=20=20= GraphicView*=20views=20=3D=20= ((OverlayViewer*)editor->GetViewer())->GetCurrentGraphicView();=0A=20=20=20= =20=20=20s->Sort(views);=0A=20=20=20=20=20=20cb->CopyInit(s);=0A=20=20=20= =20=20=20index_clipboard(s,=20cb);=0A***************=0A***=20359,365=20= ****=0A=20=20}=0A=20=20=0A=20=20Command*=20GraphCopyCmd::Copy=20()=20{=0A= !=20=20=20=20=20Command*=20copy=20=3D=20new=20= CopyCmd(CopyControlInfo());=0A=20=20=20=20=20=20InitCopy(copy);=0A=20=20=20= =20=20=20return=20copy;=0A=20=20}=0A---=20360,366=20----=0A=20=20}=0A=20=20= =0A=20=20Command*=20GraphCopyCmd::Copy=20()=20{=0A!=20=20=20=20=20= Command*=20copy=20=3D=20new=20GraphCopyCmd(CopyControlInfo());=0A=20=20=20= =20=20=20InitCopy(copy);=0A=20=20=20=20=20=20return=20copy;=0A=20=20}=0A= ***************=0A***=20373,386=20****=0A=20=20=20=20=20=20=20=20=20=20= cb=20=3D=20GetClipboard();=0A=20=20=20=20=20=20=20=20=20=20cb=20=3D=20= (cb=20=3D=3D=20nil)=20?=20unidraw->GetCatalog()->GetClipboard()=20:=20= cb;=20=0A=20=20=0A!=20=20=20=20=20=20=20=20=20GraphicView*=20views=20=3D=20= editor->GetViewer()->GetGraphicView();=0A=20=20=20=20=20=20=20=20=20=20= s->Sort(views);=0A=20=20=0A=20=20=20=20=20=20=20=20=20=20= cb->DeleteComps();=0A=20=20=20=20=20=20=20=20=20=20cb->CopyInit(s);=0A=20= =20=20=20=20=20}=0A=20=20=20=0A-=20=20=20=20=20index_clipboard(s,=20cb);=0A= =20=20}=0A=20=20=0A=20=20= /*************************************************************************= ****/=0A---=20374,388=20----=0A=20=20=20=20=20=20=20=20=20=20cb=20=3D=20= GetClipboard();=0A=20=20=20=20=20=20=20=20=20=20cb=20=3D=20(cb=20=3D=3D=20= nil)=20?=20unidraw->GetCatalog()->GetClipboard()=20:=20cb;=20=0A=20=20=0A= !=20=20=20=20=20=20=20=20=20GraphicView*=20views=20=3D=20= ((OverlayViewer*)editor->GetViewer())->GetCurrentGraphicView();=0A=20=20=20= =20=20=20=20=20=20=20s->Sort(views);=0A=20=20=0A=20=20=20=20=20=20=20=20=20= =20cb->DeleteComps();=0A=20=20=20=20=20=20=20=20=20=20cb->CopyInit(s);=0A= +=20=0A+=20=09index_clipboard(s,=20cb);=0A=20=20=20=20=20=20}=0A=20=20=20= =0A=20=20}=0A=20=20=0A=20=20= /*************************************************************************= ****/=0AIndex:=20GraphUnidraw/graphcmds.h=0Adiff=20-c=20= GraphUnidraw/graphcmds.h:1.2=20GraphUnidraw/graphcmds.h:1.3=0A***=20= GraphUnidraw/graphcmds.h:1.2=09Sun=20Sep=2023=2009:11:35=202007=0A---=20= src/GraphUnidraw/graphcmds.h=09Wed=20Aug=2026=2009:21:41=202009=0A= ***************=0A***=20101,108=20****=0A=20=20=20=20=20=20TextGraphic*=20= tgraphic;=0A=20=20};=0A=20=20=0A!=20//:=20specialized=20DeleteCmd=20for=20= graphdraw.=0A!=20class=20GraphDeleteCmd=20:=20public=20DeleteCmd=20{=0A=20= =20public:=0A=20=20=20=20=20=20GraphDeleteCmd(ControlInfo*,=20Clipboard*=20= =3D=20nil);=0A=20=20=20=20=20=20GraphDeleteCmd(Editor*=20=3D=20nil,=20= Clipboard*=20=3D=20nil);=0A---=20101,108=20----=0A=20=20=20=20=20=20= TextGraphic*=20tgraphic;=0A=20=20};=0A=20=20=0A!=20//:=20specialized=20= OvDeleteCmd=20for=20graphdraw.=0A!=20class=20GraphDeleteCmd=20:=20public=20= OvDeleteCmd=20{=0A=20=20public:=0A=20=20=20=20=20=20= GraphDeleteCmd(ControlInfo*,=20Clipboard*=20=3D=20nil);=0A=20=20=20=20=20= =20GraphDeleteCmd(Editor*=20=3D=20nil,=20Clipboard*=20=3D=20nil);=0A= Index:=20include_commands/command.h=0Adiff=20-c=20= include_commands/command.h:1.1=20include_commands/command.h:1.2=0A***=20= include_commands/command.h:1.1=09Wed=20Aug=2029=2010:39:15=202007=0A---=20= src/include/Unidraw/Commands/command.h=09Wed=20Aug=2026=2009:21:44=20= 2009=0A***************=0A***=2028,33=20****=0A---=2028,38=20----=0A=20=20= #ifndef=20unidraw_commands_command_h=0A=20=20#define=20= unidraw_commands_command_h=0A=20=20=0A+=20#define=20LEAKCHECK=0A+=20= #ifdef=20LEAKCHECK=0A+=20class=20LeakChecker;=0A+=20#endif=0A+=20=0A=20=20= #include=20<Unidraw/globals.h>=0A=20=20=0A=20=20class=20Clipboard;=0A= ***************=0A***=2095,100=20****=0A---=20100,110=20----=0A=20=20=20=20= =20=20void=20SetData(DataCache*);=0A=20=20protected:=0A=20=20=20=20=20=20= DataCache*=20_cache;=0A+=20=0A+=20#ifdef=20LEAKCHECK=0A+=20=20public:=0A= +=20=20=20=20=20static=20LeakChecker*=20_leakchecker;=0A+=20#endif=0A=20=20= };=0A=20=20=0A=20=20#endif=0AIndex:=20include_components/compview.h=0A= diff=20-c=20include_components/compview.h:1.1=20= include_components/compview.h:1.2=0A***=20= include_components/compview.h:1.1=09Wed=20Aug=2029=2010:39:16=202007=0A= ---=20src/include/Unidraw/Components/compview.h=09Wed=20Aug=2026=20= 09:21:45=202009=0A***************=0A***=2028,33=20****=0A---=2028,34=20= ----=0A=20=20#define=20unidraw_components_compview_h=0A=20=20=0A=20=20= #include=20<Unidraw/globals.h>=0A+=20#include=20<InterViews/resource.h>=0A= =20=20=0A=20=20#ifndef=20UnidrawCommon=0A=20=20class=20Command;=0A= ***************=0A***=2037,43=20****=0A=20=20=0A=20=20//:=20base=20class=20= for=20views=20of=20objects=20that=20model=20domain-specific=20elements.=0A= =20=20//=20<a=20href=3D../man3.1/ComponentView.html>man=20page</a>=0A!=20= class=20ComponentView=20{=0A=20=20public:=0A=20=20=20=20=20=20virtual=20= void=20Update();=0A=20=20#ifndef=20UnidrawCommon=0A---=2038,44=20----=0A=20= =20=0A=20=20//:=20base=20class=20for=20views=20of=20objects=20that=20= model=20domain-specific=20elements.=0A=20=20//=20<a=20= href=3D../man3.1/ComponentView.html>man=20page</a>=0A!=20class=20= ComponentView=20:=20public=20Resource=20{=0A=20=20public:=0A=20=20=20=20=20= =20virtual=20void=20Update();=0A=20=20#ifndef=20UnidrawCommon=0A= ***************=0A***=2059,64=20****=0A---=2060,68=20----=0A=20=20=20=20=20= =20virtual=20boolean=20IsA(ClassId);=0A=20=20=0A=20=20=20=20=20=20= ComponentView(Component*=20subject=20=3D=20nil);=0A+=20=0A+=20=20=20=20=20= virtual=20ComponentView*=20Duplicate()=20{=20return=20new=20= ComponentView();=20}=0A+=20=0A=20=20protected:=0A=20=20=0A=20=20=20=20=20= =20friend=20class=20Component;=0AIndex:=20include_components/grview.h=0A= diff=20-c=20include_components/grview.h:1.1=20= include_components/grview.h:1.2=0A***=20include_components/grview.h:1.1=09= Wed=20Aug=2029=2010:39:16=202007=0A---=20= src/include/Unidraw/Components/grview.h=09Wed=20Aug=2026=2009:21:45=20= 2009=0A***************=0A***=2082,87=20****=0A---=2082,89=20----=0A=20=20= =0A=20=20=20=20=20=20virtual=20ClassId=20GetClassId();=0A=20=20=20=20=20=20= virtual=20boolean=20IsA(ClassId);=0A+=20=0A+=20=20=20=20=20virtual=20= ComponentView*=20Duplicate()=20{=20return=20new=20GraphicView();=20}=0A=20= =20protected:=0A=20=20=20=20=20=20GraphicView(GraphicComp*=20=3D=20nil);=0A= =20=20=0AIndex:=20include_graphic/geomobjs.h=0Adiff=20-c=20= include_graphic/geomobjs.h:1.1=20include_graphic/geomobjs.h:1.2=0A***=20= include_graphic/geomobjs.h:1.1=09Wed=20Aug=2029=2010:39:17=202007=0A---=20= src/include/Unidraw/Graphic/geomobjs.h=09Wed=20Aug=2026=2009:21:46=20= 2009=0A***************=0A***=2035,40=20****=0A---=2035,44=20----=0A=20=20= #include=20<IV-2_6/_enter.h>=0A=20=20=0A=20=20#define=20GEOMOBJS_DEFINED=0A= +=20#define=20LEAKCHECK=0A+=20#ifdef=20LEAKCHECK=0A+=20class=20= LeakChecker;=0A+=20#endif=0A=20=20=0A=20=20class=20UList;=0A=20=20= #include=20<iosfwd>=0A***************=0A***=20115,120=20****=0A---=20= 119,125=20----=0A=20=20=20=20=20=20Coord*=20_x,=20*_y;=0A=20=20=20=20=20=20= int=20_count;=0A=20=20=20=20=20=20UList*=20_ulist;=0A+=20=20=20=20=20int=20= _pts_made;=0A=20=20=0A=20=20=20=20=20=20Coord*=20x()=20{return=20_x;}=0A=20= =20=20=20=20=20Coord*=20y()=20{return=20_y;}=0A***************=0A***=20= 130,135=20****=0A---=20135,145=20----=0A=20=20=20=20=20=20static=20= UList**=20_pts_by_n;=0A=20=20=20=20=20=20static=20int=20_pts_by_n_size;=0A= =20=20=20=20=20=20static=20boolean=20_pts_by_n_enabled;=0A+=20=0A+=20= #ifdef=20LEAKCHECK=0A+=20=20public:=0A+=20=20=20=20=20static=20= LeakChecker*=20_leakchecker;=0A+=20#endif=0A=20=20};=0A=20=20=0A=20=20= //:=20filled=20polygon=20geometric=20object=0AIndex:=20= include_graphic/graphic.h=0Adiff=20-c=20include_graphic/graphic.h:1.1=20= include_graphic/graphic.h:1.2=0A***=20include_graphic/graphic.h:1.1=09= Wed=20Aug=2029=2010:39:17=202007=0A---=20= src/include/Unidraw/Graphic/graphic.h=09Wed=20Aug=2026=2009:21:46=202009=0A= ***************=0A***=2029,34=20****=0A---=2029,39=20----=0A=20=20= #ifndef=20unidraw_graphic_graphic_h=0A=20=20#define=20= unidraw_graphic_graphic_h=0A=20=20=0A+=20#define=20LEAKCHECK=0A+=20= #ifdef=20LEAKCHECK=0A+=20class=20LeakChecker;=0A+=20#endif=0A+=20=0A=20=20= #include=20<Unidraw/globals.h>=0A=20=20#include=20= <Unidraw/Graphic/geomobjs.h>=0A=20=20#include=20= <Unidraw/Graphic/pspaint.h>=0A***************=0A***=20261,266=20****=0A= ---=20266,276=20----=0A=20=20=20=20=20=20static=20unsigned=20int=20= _hide_mask;=0A=20=20=20=20=20=20static=20unsigned=20int=20= _desensitize_mask;=0A=20=20=20=20=20=20static=20boolean=20_use_iv;=0A+=20= =0A+=20#ifdef=20LEAKCHECK=0A+=20=20public:=0A+=20=20=20=20=20static=20= LeakChecker*=20_leakchecker;=0A+=20#endif=0A=20=20};=0A=20=20=0A=20=20= class=20FullGraphic=20:=20public=20Graphic=20{=0AIndex:=20= include_std/leakchecker.h=0Adiff=20-c=20include_std/leakchecker.h:1.1=20= include_std/leakchecker.h:1.2=0A***=20include_std/leakchecker.h:1.1=09= Fri=20Sep=2028=2013:08:39=202007=0A---=20src/include/ivstd/leakchecker.h=09= Wed=20Aug=2026=2009:21:47=202009=0A***************=0A***=2025,30=20****=0A= ---=2025,31=20----=0A=20=20#define=20leak_checker_h=0A=20=20=0A=20=20= #include=20<stream.h>=0A+=20using=20std::cerr;=0A=20=20=0A=20=20//:=20= utility=20for=20counting=20undestroyed=20instances=20of=20a=20class.=0A=20= =20//=20To=20use=20create=20a=20static=20instance=20initialized=20with=20= the=20class=20name,=20i.e.=0A***************=0A***=2042,47=20****=0A---=20= 43,50=20----=0A=20=20=0A=20=20=20=20=20=20LeakChecker(const=20char*=20c)=20= :=20_alive(0),=20_class(c)=20{}=0A=20=20=20=20=20=20~LeakChecker();=0A+=20= =0A+=20=20=20=20=20int=20alive()=20{return=20_alive;}=0A=20=20private:=0A= =20=20=20=20=20=20int=20_alive;=0A=20=20=20=20=20=20const=20char*=20= _class;=0AIndex:=20OverlayUnidraw/ovcmds.c=0Adiff=20-c=20= OverlayUnidraw/ovcmds.c:1.2=20OverlayUnidraw/ovcmds.c:1.3=0A***=20= OverlayUnidraw/ovcmds.c:1.2=09Fri=20May=2016=2010:47:55=202008=0A---=20= src/OverlayUnidraw/ovcmds.c=09Wed=20Aug=2026=2009:21:38=202009=0A= ***************=0A***=20649,654=20****=0A---=20649,656=20----=0A=20=20=20= =20=20=20_reversable=20=3D=20true;=0A=20=20}=0A=20=20=0A+=20= OvDeleteCmd::~OvDeleteCmd()=20{=20}=0A+=20=0A=20=20Command*=20= OvDeleteCmd::Copy=20()=20{=0A=20=20=20=20=20=20Command*=20copy=20=3D=20= new=20OvDeleteCmd(CopyControlInfo());=0A=20=20=20=20=20=20= InitCopy(copy);=0AIndex:=20OverlayUnidraw/ovcmds.h=0Adiff=20-c=20= OverlayUnidraw/ovcmds.h:1.1=20OverlayUnidraw/ovcmds.h:1.2=0A***=20= OverlayUnidraw/ovcmds.h:1.1=09Wed=20Aug=2029=2010:38:50=202007=0A---=20= src/OverlayUnidraw/ovcmds.h=09Wed=20Aug=2026=2009:21:38=202009=0A= ***************=0A***=20180,185=20****=0A---=20180,186=20----=0A=20=20= public:=0A=20=20=20=20=20=20OvDeleteCmd(ControlInfo*,=20Clipboard*=20=3D=20= nil);=0A=20=20=20=20=20=20OvDeleteCmd(Editor*=20=3D=20nil,=20Clipboard*=20= =3D=20nil);=0A+=20=20=20=20=20virtual=20~OvDeleteCmd();=0A=20=20=0A=20=20= =20=20=20=20virtual=20Command*=20Copy();=0A=20=20=20=20=20=20virtual=20= ClassId=20GetClassId();=0AIndex:=20OverlayUnidraw/ovcomps.c=0Adiff=20-c=20= OverlayUnidraw/ovcomps.c:1.5=20OverlayUnidraw/ovcomps.c:1.6=0A***=20= OverlayUnidraw/ovcomps.c:1.5=09Sat=20Nov=20=208=2010:10:53=202008=0A---=20= src/OverlayUnidraw/ovcomps.c=09Wed=20Aug=2026=2009:21:38=202009=0A= ***************=0A***=2071,76=20****=0A---=2071,82=20----=0A=20=20}=0A=20= =20#endif=0A=20=20=0A+=20#ifdef=20LEAKCHECK=0A+=20#include=20= <leakchecker.h>=0A+=20LeakChecker*=20OverlayComp::_leakchecker=20=3D=20= nil;=0A+=20#endif=0A+=20=0A+=20=0A=20=20= /*************************************************************************= ****/=0A=20=20=0A=20=20static=20OverlayComp*=20Pred=20(OverlayComp*=20= child)=20{=0A***************=0A***=20100,105=20****=0A---=20106,115=20= ----=0A=20=20=20=20=20=20_anno=20=3D=20nil;=0A=20=20=20=20=20=20= _attrlist=20=3D=20nil;=0A=20=20=20=20=20=20_notify_deferred=20=3D=200;=0A= +=20#ifdef=20LEAKCHECK=0A+=20=20=20=20=20if(!_leakchecker)=20= _leakchecker=20=3D=20new=20LeakChecker("OverlayComp");=0A+=20=20=20=20=20= _leakchecker->create();=0A+=20#endif=0A=20=20}=0A=20=20=0A=20=20= OverlayComp::OverlayComp=20(istream&=20in)=20{=20=0A***************=0A= ***=20109,120=20****=0A---=20119,137=20----=0A=20=20=20=20=20=20= _attrlist=20=3D=20nil;=0A=20=20=20=20=20=20_notify_deferred=20=3D=200;=0A= =20=20=20=20=20=20_valid=20=3D=20GetParamList()->read_args(in,=20this);=0A= +=20#ifdef=20LEAKCHECK=0A+=20=20=20=20=20if(!_leakchecker)=20= _leakchecker=20=3D=20new=20LeakChecker("OverlayComp");=0A+=20=20=20=20=20= _leakchecker->create();=0A+=20#endif=0A=20=20}=0A=20=20=0A=20=20= OverlayComp::~OverlayComp=20()=20{=0A=20=20=20=20=20=20if=20(_anno)=0A=20= =20=09delete=20[]=20_anno;=0A=20=20=20=20=20=20Unref(_attrlist);=0A+=20= #ifdef=20LEAKCHECK=0A+=20=20=20=20=20_leakchecker->destroy();=0A+=20= #endif=0A=20=20}=0A=20=20=0A=20=20AttributeList*=20= OverlayComp::GetAttributeList()=20{=0AIndex:=20OverlayUnidraw/ovcomps.h=0A= diff=20-c=20OverlayUnidraw/ovcomps.h:1.4=20OverlayUnidraw/ovcomps.h:1.5=0A= ***=20OverlayUnidraw/ovcomps.h:1.4=09Sat=20Nov=20=208=2010:10:53=202008=0A= ---=20src/OverlayUnidraw/ovcomps.h=09Wed=20Aug=2026=2009:21:38=202009=0A= ***************=0A***=2029,34=20****=0A---=2029,39=20----=0A=20=20= #ifndef=20ovcomps_h=0A=20=20#define=20ovcomps_h=0A=20=20=0A+=20#define=20= LEAKCHECK=0A+=20#ifdef=20LEAKCHECK=0A+=20class=20LeakChecker;=0A+=20= #endif=0A+=20=0A=20=20#include=20<UniIdraw/idcomp.h>=0A=20=20#include=20= <InterViews/observe.h>=0A=20=20#include=20<Attribute/classid.h>=0A= ***************=0A***=20201,206=20****=0A---=20206,218=20----=0A=20=20= friend=20class=20OverlaysScript;=0A=20=20=0A=20=20=20=20=20=20= CLASS_SYMID("OverlayComp");=20=0A+=20=0A+=20#ifdef=20LEAKCHECK=0A+=20=20= public:=0A+=20=20=20=20=20static=20LeakChecker*=20_leakchecker;=0A+=20= #endif=0A+=20=0A+=20=0A=20=20};=0A=20=20=0A=20=20//:=20composite=20= component,=20clone=20of=20GraphicComps=20derived=20from=20OverlayComp=0A= Index:=20OverlayUnidraw/ovraster.c=0Adiff=20-c=20= OverlayUnidraw/ovraster.c:1.4=20OverlayUnidraw/ovraster.c:1.5=0A***=20= OverlayUnidraw/ovraster.c:1.4=09Fri=20May=2016=2010:47:55=202008=0A---=20= src/OverlayUnidraw/ovraster.c=09Wed=20Aug=2026=2009:21:38=202009=0A= ***************=0A***=201100,1108=20****=0A=20=20= /*************************************************************************= ****/=0A=20=20=0A=20=20//=20#define=20LEAKCHECK=0A=20=20=0A=20=20#ifdef=20= LEAKCHECK=0A!=20#include=20<OverlayUnidraw/leakchecker.h>=0A=20=20static=20= LeakChecker=20checker("OverlayRaster");=0A=20=20#endif=0A=20=20=0A---=20= 1100,1109=20----=0A=20=20= /*************************************************************************= ****/=0A=20=20=0A=20=20//=20#define=20LEAKCHECK=0A+=20#undef=20LEAKCHECK=0A= =20=20=0A=20=20#ifdef=20LEAKCHECK=0A!=20#include=20<leakchecker.h>=0A=20=20= static=20LeakChecker=20checker("OverlayRaster");=0A=20=20#endif=0A=20=20=0A= Index:=20OverlayUnidraw/ovviews.c=0Adiff=20-c=20= OverlayUnidraw/ovviews.c:1.1=20OverlayUnidraw/ovviews.c:1.2=0A***=20= OverlayUnidraw/ovviews.c:1.1=09Wed=20Aug=2029=2010:38:51=202007=0A---=20= src/OverlayUnidraw/ovviews.c=09Wed=20Aug=2026=2009:21:38=202009=0A= ***************=0A***=2059,64=20****=0A---=2059,69=20----=0A=20=20=0A=20=20= #include=20<stream.h>=0A=20=20=0A+=20#ifdef=20LEAKCHECK=0A+=20#include=20= <leakchecker.h>=0A+=20LeakChecker*=20OverlayView::_leakchecker=20=3D=20= nil;=0A+=20#endif=0A+=20=0A=20=20= /*************************************************************************= ****/=0A=20=20=0A=20=20OverlayView::OverlayView(OverlayComp*=20subj)=20:=20= GraphicView(subj)=20{=0A***************=0A***=2066,71=20****=0A---=20= 71,86=20----=0A=20=20=20=20=20=20UnfixSize();=0A=20=20=20=20=20=20= UnfixLocation();=0A=20=20=20=20=20=20_hilite_gs=20=3D=20nil;=0A+=20= #ifdef=20LEAKCHECK=0A+=20=20=20=20=20if(!_leakchecker)=20_leakchecker=20= =3D=20new=20LeakChecker("OverlayView");=0A+=20=20=20=20=20= _leakchecker->create();=0A+=20#endif=0A+=20}=0A+=20=0A+=20= OverlayView::~OverlayView=20()=20{=0A+=20#ifdef=20LEAKCHECK=0A+=20=20=20=20= =20_leakchecker->destroy();=0A+=20#endif=0A=20=20}=0A=20=20=0A=20=20= ClassId=20OverlayView::GetClassId=20()=20{=20return=20OVERLAY_VIEW;=20}=0A= ***************=0A***=20355,360=20****=0A---=20370,382=20----=0A=20=20=0A= =20=20= /*************************************************************************= ****/=0A=20=20=0A+=20OverlayViewRef::OverlayViewRef=20(OverlayComp*=20= subj)=20:=20OverlayView(subj)=20{=0A+=20}=0A+=20=0A+=20= OverlayViewRef::~OverlayViewRef=20()=20{}=0A+=20=0A+=20= /*************************************************************************= ****/=0A+=20=0A=20=20OverlaysView::OverlaysView=20(OverlaysComp*=20subj)=20= :=20OverlayView(subj)=20{=0A=20=20=20=20=20=20_views=20=3D=20new=20= UList;=0A=20=20}=0AIndex:=20OverlayUnidraw/ovviews.h=0Adiff=20-c=20= OverlayUnidraw/ovviews.h:1.2=20OverlayUnidraw/ovviews.h:1.3=0A***=20= OverlayUnidraw/ovviews.h:1.2=09Fri=20May=2016=2010:47:55=202008=0A---=20= src/OverlayUnidraw/ovviews.h=09Wed=20Aug=2026=2009:21:38=202009=0A= ***************=0A***=2033,41=20****=0A---=2033,47=20----=0A=20=20=0A=20=20= #include=20<Unidraw/Components/grview.h>=0A=20=20#include=20= <Unidraw/Components/psview.h>=0A+=20#include=20<InterViews/resource.h>=0A= =20=20=0A=20=20#include=20<IV-2_6/_enter.h>=0A=20=20=0A+=20#define=20= LEAKCHECK=0A+=20#ifdef=20LEAKCHECK=0A+=20class=20LeakChecker;=0A+=20= #endif=0A+=20=0A=20=20class=20Canvas;=0A=20=20class=20OverlayComp;=0A=20=20= class=20OverlaysComp;=0A***************=0A***=20131,138=20****=0A=20=20=20= =20=20=20Manipulator*=20CreateStretchManip(Viewer*,=20Event&,=20= Transformer*,=20Tool*);=0A=20=20=20=20=20=20//=20specialized=20method=20= to=20construct=20OpaqueDragManip=20instead=20of=20DragManip.=0A=20=20=0A=20= =20=20=20=20=20OverlayView(OverlayComp*=20=3D=20nil);=0A-=20protected:=0A= =20=20=0A=20=20=20=20=20=20OverlayView*=20View(UList*);=0A=20=20=20=20=20= =20OverlayView*=20GetOverlayView(Graphic*);=0A---=20137,147=20----=0A=20=20= =20=20=20=20Manipulator*=20CreateStretchManip(Viewer*,=20Event&,=20= Transformer*,=20Tool*);=0A=20=20=20=20=20=20//=20specialized=20method=20= to=20construct=20OpaqueDragManip=20instead=20of=20DragManip.=0A=20=20=0A= +=20=20=20=20=20virtual=20ComponentView*=20Duplicate()=20{=20return=20= new=20OverlayView();=20}=0A+=20=0A+=20=20=20=20=20virtual=20= ~OverlayView();=0A+=20protected:=20=20=20=20=0A=20=20=20=20=20=20= OverlayView(OverlayComp*=20=3D=20nil);=0A=20=20=0A=20=20=20=20=20=20= OverlayView*=20View(UList*);=0A=20=20=20=20=20=20OverlayView*=20= GetOverlayView(Graphic*);=0A***************=0A***=20143,148=20****=0A---=20= 152,169=20----=0A=20=20=20=20=20=20float=20_fixed_size_factor;=0A=20=20=20= =20=20=20boolean=20_fixed_location;=0A=20=20=20=20=20=20Graphic*=20= _hilite_gs;=0A+=20=0A+=20#ifdef=20LEAKCHECK=0A+=20=20public:=0A+=20=20=20= =20=20static=20LeakChecker*=20_leakchecker;=0A+=20#endif=0A+=20};=0A+=20=0A= +=20//:=20OverlayView=20used=20as=20Resource=0A+=20class=20= OverlayViewRef=20:=20public=20OverlayView=20{=0A+=20=20public:=0A+=20=20=20= OverlayViewRef(OverlayComp*=20=3D=20nil);=0A+=20=20=20virtual=20= ~OverlayViewRef();=0A=20=20};=0A=20=20=0A=20=20//:=20graphical=20view=20= of=20OverlaysComp.=0AIndex:=20top_ivtools/CHANGES=0Adiff=20-c=20= top_ivtools/CHANGES:1.7=20top_ivtools/CHANGES:1.8=0A***=20= top_ivtools/CHANGES:1.7=09Sat=20Oct=2025=2010:24:57=202008=0A---=20= ../CHANGES=09Wed=20Aug=2026=2009:21:30=202009=0A***************=0A***=20= 1,6=20****=0A!=20October=209th,=202008=20=20ivtools-1.2.7=0A=20=20=0A!=20= -=20balance=20of=20changes=20to=20support=20ipl-1.0.3=0A=20=20=0A=20=20= July=209th,=202008=20=20ivtools-1.2.6=0A=20=20=0A---=201,6=20----=0A!=20= August=2025th,=202009=20=20ivtools-1.2.7=0A=20=20=0A!=20-=20balance=20of=20= changes=20to=20support=20ipl-1.0.4=0A=20=20=0A=20=20July=209th,=202008=20= =20ivtools-1.2.6=0A=20=20=0AIndex:=20top_ivtools/VERSION=0Adiff=20-c=20= top_ivtools/VERSION:1.2=20top_ivtools/VERSION:1.3=0A***=20= top_ivtools/VERSION:1.2=09Wed=20Jul=20=209=2011:24:40=202008=0A---=20= ../VERSION=09Wed=20Aug=2026=2009:21:30=202009=0A***************=0A***=201=20= ****=0A!=20Release=201.2.6=0A---=201=20----=0A!=20Release=201.2.7=0A= Index:=20Unidraw/command.c=0Adiff=20-c=20Unidraw/command.c:1.1=20= Unidraw/command.c:1.2=0A***=20Unidraw/command.c:1.1=09Wed=20Aug=2029=20= 10:38:45=202007=0A---=20src/Unidraw/command.c=09Wed=20Aug=2026=20= 09:21:36=202009=0A***************=0A***=2045,50=20****=0A---=2045,55=20= ----=0A=20=20=0A=20=20#include=20<IV-2_6/_enter.h>=0A=20=20=0A+=20#ifdef=20= LEAKCHECK=0A+=20#include=20<leakchecker.h>=0A+=20LeakChecker*=20= Command::_leakchecker=20=3D=20nil;=0A+=20#endif=0A+=20=0A=20=20= /*************************************************************************= ****/=0A=20=20=0A=20=20static=20const=20int=20DATACACHE_SIZE=20=3D=20= 255;=0A***************=0A***=20117,122=20****=0A---=20122,131=20----=0A=20= =20boolean=20Command::IsA=20(ClassId=20id)=20{=20return=20COMMAND=20=3D=3D= =20id;=20}=0A=20=20=0A=20=20Command::Command=20(ControlInfo*=20m,=20= Clipboard*=20cb)=20{=0A+=20#ifdef=20LEAKCHECK=0A+=20=20=20=20=20= if(!_leakchecker)=20_leakchecker=20=3D=20new=20LeakChecker("Command");=0A= +=20=20=20=20=20_leakchecker->create();=0A+=20#endif=0A=20=20=20=20=20=20= Command::SetControlInfo(m);=0A=20=20=20=20=20=20_editor=20=3D=20nil;=0A=20= =20=20=20=20=20_clipboard=20=3D=20cb;=0A***************=0A***=20124,129=20= ****=0A---=20133,142=20----=0A=20=20}=0A=20=20=0A=20=20Command::Command=20= (Editor*=20ed,=20Clipboard*=20cb)=20{=0A+=20#ifdef=20LEAKCHECK=0A+=20=20=20= =20=20if(!_leakchecker)=20_leakchecker=20=3D=20new=20= LeakChecker("Command");=0A+=20=20=20=20=20_leakchecker->create();=0A+=20= #endif=0A=20=20=20=20=20=20_ctrlInfo=20=3D=20nil;=0A=20=20=20=20=20=20= _editor=20=3D=20ed;=0A=20=20=20=20=20=20_clipboard=20=3D=20cb;=0A= ***************=0A***=20131,136=20****=0A---=20144,152=20----=0A=20=20}=0A= =20=20=0A=20=20Command::~Command=20()=20{=20=0A+=20#ifdef=20LEAKCHECK=0A= +=20=20=20=20=20_leakchecker->destroy();=0A+=20#endif=0A=20=20=20=20=20=20= if=20(_ctrlInfo=20!=3D=20nil)=20{=0A=20=20=20=20=20=20=20=20=20=20delete=20= _ctrlInfo;=0A=20=20=20=20=20=20}=0AIndex:=20Unidraw/geomobjs.c=0Adiff=20= -c=20Unidraw/geomobjs.c:1.3=20Unidraw/geomobjs.c:1.4=0A***=20= Unidraw/geomobjs.c:1.3=09Sun=20Sep=2030=2022:22:07=202007=0A---=20= src/Unidraw/geomobjs.c=09Wed=20Aug=2026=2009:21:37=202009=0A= ***************=0A***=20183,204=20****=0A---=20183,220=20----=0A=20=20=0A= =20=20= /*************************************************************************= ****/=0A=20=20=0A+=20#ifdef=20LEAKCHECK=0A+=20#include=20<leakchecker.h>=0A= +=20LeakChecker*=20MultiLineObj::_leakchecker=20=3D=20nil;=0A+=20#endif=0A= +=20=0A=20=20UList**=20MultiLineObj::_pts_by_n=20=3D=20nil;=0A=20=20int=20= MultiLineObj::_pts_by_n_size=20=3D=201024;=0A=20=20boolean=20= MultiLineObj::_pts_by_n_enabled=20=3D=20false;=0A=20=20=0A=20=20= MultiLineObj::MultiLineObj=20(Coord*=20x,=20Coord*=20y,=20int=20count)=20= {=0A+=20#ifdef=20LEAKCHECK=0A+=20=20=20=20=20if(!_leakchecker)=20= _leakchecker=20=3D=20new=20LeakChecker("MultiLineObj");=0A+=20=20=20=20=20= _leakchecker->create();=0A+=20#endif=0A=20=20=20=20=20=20_x=20=3D=20x;=20= _y=20=3D=20y;=20_count=20=3D=20count;=0A=20=20=20=20=20=20_ulist=20=3D=20= nil;=0A+=20=20=20=20=20_pts_made=20=3D=200;=0A=20=20}=0A=20=20=0A=20=20= MultiLineObj::~MultiLineObj()=20{=0A+=20#ifdef=20LEAKCHECK=0A+=20=20=20=20= =20_leakchecker->destroy();=0A+=20#endif=0A=20=20=20=20=20=20if=20= (_ulist)=20{=0A=20=20=09UList*=20head=20=3D=20_pts_by_n[count()];=0A=20=20= =09head->Remove(_ulist);=0A=20=20=09delete=20_ulist;=0A=20=20=09delete=20= _x;=0A=20=20=09delete=20_y;=0A+=20=20=20=20=20}=20else=20if=20= (_pts_made)=20{=0A+=20=20=20=20=20=20=20=20=20delete=20_x;=0A+=20=09= delete=20_y;=0A=20=20=20=20=20=20}=0A=20=20}=0A=20=20=0A***************=0A= ***=20458,463=20****=0A---=20474,480=20----=0A=20=20=20=20=20=20=20=20=20= =20Coord=20*copyx,=20*copyy;=0A=20=20=09ArrayDup(x,=20y,=20npts,=20= copyx,=20copyy);=0A=20=20=09MultiLineObj*=20mlo=20=3D=20new=20= MultiLineObj(copyx,=20copyy,=20npts);=0A+=20=09mlo->_pts_made=20=3D=201;=0A= =20=20=09return=20mlo;=0A=20=20=20=20=20=20}=0A=20=20=0AIndex:=20= Unidraw/graphic.c=0Adiff=20-c=20Unidraw/graphic.c:1.1=20= Unidraw/graphic.c:1.2=0A***=20Unidraw/graphic.c:1.1=09Wed=20Aug=2029=20= 10:38:45=202007=0A---=20src/Unidraw/graphic.c=09Wed=20Aug=2026=20= 09:21:37=202009=0A***************=0A***=2036,41=20****=0A---=2036,46=20= ----=0A=20=20=0A=20=20#include=20<IV-2_6/_enter.h>=0A=20=20=0A+=20#ifdef=20= LEAKCHECK=0A+=20#include=20<leakchecker.h>=0A+=20LeakChecker*=20= Graphic::_leakchecker=20=3D=20nil;=0A+=20#endif=0A+=20=0A=20=20= /*************************************************************************= ****/=0A=20=20=0A=20=20Transformer*=20Graphic::_identity;=0A= ***************=0A***=2047,52=20****=0A---=2052,61=20----=0A=20=20= boolean=20Graphic::_use_iv=20=3D=20true;=0A=20=20=0A=20=20= Graphic::Graphic=20(Graphic*=20gr)=20{=0A+=20#ifdef=20LEAKCHECK=0A+=20=20= =20=20=20if(!_leakchecker)=20_leakchecker=20=3D=20new=20= LeakChecker("Graphic");=0A+=20=20=20=20=20_leakchecker->create();=0A+=20= #endif=0A=20=20=20=20=20=20_parent=20=3D=20nil;=0A=20=20=20=20=20=20_fg=20= =3D=20_bg=20=3D=20nil;=0A=20=20=20=20=20=20_tag=20=3D=20nil;=0A= ***************=0A***=2077,82=20****=0A---=2086,94=20----=0A=20=20}=0A=20= =20=0A=20=20Graphic::~Graphic=20()=20{=0A+=20#ifdef=20LEAKCHECK=0A+=20=20= =20=20=20_leakchecker->destroy();=0A+=20#endif=0A=20=20=20=20=20=20= Unref(_fg);=0A=20=20=20=20=20=20Unref(_bg);=0A=20=20=20=20=20=20= Unref(_t);=0A***=20/dev/null=09=20Wed=20Aug=2026=2009:21:49=20PDT=202009=0A= ---=20patches/ivtools-090826-johnston-027=0A***************=20= patches/ivtools-090826-johnston-027=0A***=200=20****=0A---=201=20----=0A= +=20ivtools-090826-johnston-027=0A= --Apple-Mail-40-56714919 Content-Disposition: attachment; filename=ivtools-090518-johnston-026 Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-090518-johnston-026" Content-Transfer-Encoding: 7bit Patch: ivtools-090518-johnston-026 For: ivtools-1.2 Author: [email protected] Subject: new files for previous patch Requires: This is an intermediate patch to ivtools-1.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: Index: DrawServ/drawcmds.c diff -c /dev/null DrawServ/drawcmds.c:1.1 *** /dev/null Mon May 18 16:45:11 2009 --- src/DrawServ/drawcmds.c Mon May 18 16:45:10 2009 *************** *** 0 **** --- 1,148 ---- + /* + * Copyright (c) 2009 Scott E. Johnston + * Copyright (c) 1997-2000 Vectaport Inc. + * Copyright (c) 1994, 1995 Vectaport Inc., 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 <DrawServ/drawclasses.h> + #include <DrawServ/drawcmds.h> + #include <DrawServ/draweditor.h> + + #include <FrameUnidraw/framestates.h> + #include <FrameUnidraw/framecomps.h> + + #include <GraphUnidraw/edgecomp.h> + #include <GraphUnidraw/graphcmds.h> + #include <GraphUnidraw/nodecomp.h> + + #include <Unidraw/clipboard.h> + #include <Unidraw/iterator.h> + + static NodeComp* node (Clipboard* cb, int index) { + if (index == -1) + return nil; + + Iterator i; + int count = -1; + for (cb->First(i); !cb->Done(i); cb->Next(i)) { + GraphicComp* gcomp = cb->GetComp(i); + if (gcomp->IsA(NODE_COMP)) { + count++; + if (count == index) + return (NodeComp*)gcomp; + } + } + return nil; + } + + /*****************************************************************************/ + + ClassId DrawPasteCmd::GetClassId () { return DRAWPASTE_CMD; } + + boolean DrawPasteCmd::IsA (ClassId id) { + return DRAWPASTE_CMD==id || FramePasteCmd::IsA(id); + } + + DrawPasteCmd::DrawPasteCmd (ControlInfo* c, Clipboard* cb) : FramePasteCmd(c, cb) { + } + + DrawPasteCmd::DrawPasteCmd (Editor* ed, Clipboard* cb) : FramePasteCmd(ed, cb) { + } + + DrawPasteCmd::~DrawPasteCmd () { + } + + Command* DrawPasteCmd::Copy () { + Command* copy = new DrawPasteCmd(CopyControlInfo(), DeepCopyClipboard()); + InitCopy(copy); + return copy; + } + + void DrawPasteCmd::Execute () { + if(!_executed) { + Clipboard* cb = GetClipboard(); + Iterator it; + cb->First(it); + GraphicComp* gcomp = cb->GetComp(it); + cb->Next(it); + if(cb->Done(it) && gcomp->IsA(DRAW_IDRAW_COMP) || gcomp->IsA(FRAME_IDRAW_COMP)) + { + gcomp->First(it); + + /* move to background frame */ + DrawEditor* ed = (DrawEditor*)GetEditor(); + FrameNumberState* fnumstate = ed->framenumstate(); + int origfnum = fnumstate->framenumber(); + int currfnum = 0; + Append(new MoveFrameCmd(ed, -origfnum, true /* allowbg */)); + + /* paste contents of background frame */ + FrameComp* fcomp = (FrameComp*) (gcomp->GetComp(it)->IsA(FRAME_COMP) ? gcomp->GetComp(it) : nil); + if (fcomp) { + + while(!gcomp->Done(it)) { + gcomp->Remove(it); + Clipboard* newcb = new Clipboard(); + Iterator jt; + fcomp->First(jt); + while(!fcomp->Done(jt)) { + newcb->Append(fcomp->GetComp(jt)); + fcomp->Remove(jt); + } + Append(new PasteCmd(ed, newcb)); + delete fcomp; + + /* while more frames move to next frame and paste (create new frame if necessary) */ + if(!gcomp->Done(it)) { + currfnum++; + fcomp = (FrameComp*) (gcomp->GetComp(it)->IsA(FRAME_COMP) ? gcomp->GetComp(it) : nil); + if(currfnum>=ed->NumFrames()) + Append(new CreateMoveFrameCmd(ed)); + else + Append(new MoveFrameCmd(ed, 1, true /* allowbg */)); + } + } + } + + /* move to original frame */ + Append(new MoveFrameCmd(ed, origfnum-currfnum, true /* allowbg */)); + } + + else { + Append(new PasteCmd(GetEditor(), cb->Copy())); + Iterator i; + for (cb->First(i); !cb->Done(i); cb->Next(i)) { + GraphicComp* gcomp = cb->GetComp(i); + if (gcomp->IsA(EDGE_COMP)) { + EdgeComp* comp = (EdgeComp*)gcomp; + NodeComp* start = node(cb, comp->GetStartNode()); + NodeComp* end = node(cb, comp->GetEndNode()); + EdgeConnectCmd* cmd = new EdgeConnectCmd(GetEditor(), comp, start, end); + Append(cmd); + } + } + } + } + MacroCmd::Execute(); + _executed = 1; + } + Index: DrawServ/drawcmds.h diff -c /dev/null DrawServ/drawcmds.h:1.1 *** /dev/null Mon May 18 16:45:11 2009 --- src/DrawServ/drawcmds.h Mon May 18 16:45:10 2009 *************** *** 0 **** --- 1,46 ---- + /* + * Copyright (c) 2009 Scott E. Johnston + * Copyright (c) 1994, 1995, 1999 Vectaport Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * 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 drawcmds_h + #define drawcmds_h + + #include <FrameUnidraw/framecmds.h> + + //: specialized PasteCmd for DrawServ + class DrawPasteCmd : public FramePasteCmd { + public: + DrawPasteCmd(ControlInfo*, Clipboard* = nil); + DrawPasteCmd(Editor* = nil, Clipboard* = nil); + virtual ~DrawPasteCmd(); + + virtual void Execute(); + + virtual Command* Copy(); + virtual ClassId GetClassId(); + virtual boolean IsA(ClassId); + + protected: + }; + + #endif Index: DrawServ/drawimport.c diff -c /dev/null DrawServ/drawimport.c:1.1 *** /dev/null Mon May 18 16:45:11 2009 --- src/DrawServ/drawimport.c Mon May 18 16:45:10 2009 *************** *** 0 **** --- 1,136 ---- + /* + * Copyright (c) 2009 Scott E. Johnston + * Copyright (c) 1996 Vectaport Inc. + * Copyright (c) 1994-1995 Vectaport Inc., Cartoactive Systems + * Copyright (c) 1990, 1991 Stanford University + * + * 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. + * + */ + + /* + * DrawImportCmd implementation. + */ + + #include <DrawServ/drawcatalog.h> + #include <DrawServ/drawcmds.h> + #include <DrawServ/drawimport.h> + #include <DrawServ/drawclasses.h> + #include <DrawServ/drawcatalog.h> + + #include <FrameUnidraw/framecmds.h> + + #include <GraphUnidraw/graphcatalog.h> + #include <GraphUnidraw/graphcomp.h> + #include <GraphUnidraw/graphcmds.h> + #include <GraphUnidraw/graphcreator.h> + #include <GraphUnidraw/grapheditor.h> + #include <GraphUnidraw/nodecomp.h> + + #include <IVGlyph/importchooser.h> + + #include <Unidraw/clipboard.h> + #include <Unidraw/iterator.h> + #include <Unidraw/unidraw.h> + #include <Unidraw/viewer.h> + + #include <string.h> + + /*****************************************************************************/ + + ClassId DrawImportCmd::GetClassId () { return GRAPHIMPORT_CMD; } + + boolean DrawImportCmd::IsA (ClassId id) { + return DRAWIMPORT_CMD == id || FrameImportCmd::IsA(id); + } + + DrawImportCmd::DrawImportCmd (ControlInfo* c, ImportChooser* f) : FrameImportCmd(c, f) { + } + + DrawImportCmd::DrawImportCmd (Editor* ed, ImportChooser* f) : FrameImportCmd(ed, f) { + } + + Command* DrawImportCmd::Copy () { + DrawImportCmd* copy = new DrawImportCmd(CopyControlInfo(), chooser_); + InitCopy(copy); + return copy; + } + + void DrawImportCmd::Execute () { + GraphicComp* comps = PostDialog(); + + Clipboard* cb; + if (comps != nil) { + DrawPasteCmd* paste_cmd = new DrawPasteCmd(GetEditor(), new Clipboard(comps)); + paste_cmd->Execute(); + paste_cmd->Log(); + + if(!comps->IsA(FRAME_IDRAW_COMP) && !comps->IsA(DRAW_IDRAW_COMP)) { + if (chooser_->centered()) + GetEditor()->GetViewer()->Align(comps, /* Center */ 4); + + if (!chooser_->by_pathname()) { + FrameUngroupCmd* ungroup_cmd = new FrameUngroupCmd(GetEditor()); + ungroup_cmd->Execute(); + MacroCmd* macro_cmd = new MacroCmd(GetEditor(), paste_cmd, ungroup_cmd); + macro_cmd->Log(); + } else { + paste_cmd->Log(); + } + } else + delete comps; + } + } + + + + GraphicComp* DrawImportCmd::Import (const char* pathname) { + GraphicComp* comp = nil; + const char* creator = ReadCreator(pathname); + DrawCatalog* catalog = (DrawCatalog*)unidraw->GetCatalog(); + + if (strcmp(creator, "drawserv") == 0) { + catalog->SetImport(true); + if (catalog->DrawCatalog::Retrieve(pathname, (Component*&) comp)) { + catalog->SetImport(false); + catalog->Forget(comp); + return comp; + } + catalog->SetImport(false); + return nil; + } + else if (strcmp(creator, "graphdraw") == 0 || + strcmp(creator, "netdraw") == 0 || + strcmp(creator, "graph-idraw") == 0) { + static GraphCatalog *graphcatalog = new GraphCatalog("GraphCatalog", new GraphCreator());; + graphcatalog->SetImport(true); + if (graphcatalog->Retrieve(pathname, (Component*&) comp)) { + graphcatalog->SetImport(false); + graphcatalog->Forget(comp); + + if (chooser_->by_pathname()) { + return new NodeComp((GraphComp*)comp); + } else + return comp; + } + catalog->SetImport(false); + return nil; + } else + return FrameImportCmd::Import(pathname); + } Index: DrawServ/drawimport.h diff -c /dev/null DrawServ/drawimport.h:1.1 *** /dev/null Mon May 18 16:45:11 2009 --- src/DrawServ/drawimport.h Mon May 18 16:45:10 2009 *************** *** 0 **** --- 1,51 ---- + /* + * Copyright (c) 2009 Scott E. Johnston + * Copyright (c) 1996,1999 Vectaport Inc. + * Copyright (c) 1990, 1991 Stanford University + * + * 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. + * + */ + + /* + * DrawImportCmd - a command for importing graphs in multi-frame situations + */ + + #ifndef draw_import_h + #define draw_import_h + + #include <FrameUnidraw/frameimport.h> + + #include <stdio.h> + + //: specialized FrameImportCmd for importing graphs in frames + class DrawImportCmd : public FrameImportCmd { + public: + DrawImportCmd(ControlInfo*, ImportChooser* = nil); + DrawImportCmd(Editor* = nil, ImportChooser* = nil); + + virtual void Execute(); + virtual Command* Copy(); + virtual ClassId GetClassId(); + virtual boolean IsA(ClassId); + + virtual GraphicComp* Import(const char*); + }; + + #endif Index: FrameUnidraw/frameimport.c diff -c /dev/null FrameUnidraw/frameimport.c:1.1 *** /dev/null Mon May 18 16:45:10 2009 --- src/FrameUnidraw/frameimport.c Mon May 18 16:45:09 2009 *************** *** 0 **** --- 1,111 ---- + /* + * Copyright (c) 2009 Scott E. Johnston + * Copyright (c) 1996 Vectaport Inc. + * Copyright (c) 1994-1995 Vectaport Inc., Cartoactive Systems + * Copyright (c) 1990, 1991 Stanford University + * + * 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. + * + */ + + /* + * FrameImportCmd implementation. + */ + + #include <FrameUnidraw/framecatalog.h> + #include <FrameUnidraw/framecomps.h> + #include <FrameUnidraw/frameclasses.h> + #include <FrameUnidraw/framecmds.h> + #include <FrameUnidraw/frameeditor.h> + #include <FrameUnidraw/frameimport.h> + + #include <IVGlyph/importchooser.h> + + #include <Unidraw/clipboard.h> + #include <Unidraw/iterator.h> + #include <Unidraw/unidraw.h> + #include <Unidraw/viewer.h> + + #include <string.h> + + /*****************************************************************************/ + + ClassId FrameImportCmd::GetClassId () { return FRAMEIMPORT_CMD; } + + boolean FrameImportCmd::IsA (ClassId id) { + return FRAMEIMPORT_CMD == id || OvImportCmd::IsA(id); + } + + FrameImportCmd::FrameImportCmd (ControlInfo* c, ImportChooser* f) : OvImportCmd(c, f) { + } + + FrameImportCmd::FrameImportCmd (Editor* ed, ImportChooser* f) : OvImportCmd(ed, f) { + } + + Command* FrameImportCmd::Copy () { + FrameImportCmd* copy = new FrameImportCmd(CopyControlInfo(), chooser_); + InitCopy(copy); + return copy; + } + + void FrameImportCmd::Execute () { + GraphicComp* comps = PostDialog(); + + Clipboard* cb; + if (comps != nil) { + FramePasteCmd* paste_cmd = new FramePasteCmd(GetEditor(), new Clipboard(comps)); + paste_cmd->Execute(); + paste_cmd->Log(); + + if (!comps->IsA(FRAME_IDRAW_COMP)) { + if(chooser_->centered()) + GetEditor()->GetViewer()->Align(comps, /* Center */ 4); + + if (!chooser_->by_pathname()) { + FrameUngroupCmd* ungroup_cmd = new FrameUngroupCmd(GetEditor()); + ungroup_cmd->Execute(); + MacroCmd* macro_cmd = new MacroCmd(GetEditor(), paste_cmd, ungroup_cmd); + macro_cmd->Log(); + } else { + paste_cmd->Log(); + } + } else + delete comps; + } + } + + GraphicComp* FrameImportCmd::Import (const char* pathname) { + GraphicComp* comp = nil; + const char* creator = ReadCreator(pathname); + if(!creator) return nil; + FrameCatalog* catalog = (FrameCatalog*)unidraw->GetCatalog(); + + if (strcmp(creator, "flipbook") == 0 || + strcmp(creator, "frame-idraw") == 0) { + catalog->SetImport(true); + if (catalog->FrameCatalog::Retrieve(pathname, (Component*&) comp)) { + catalog->SetImport(false); + catalog->Forget(comp); + return comp; + } + catalog->SetImport(false); + return nil; + } else + return OvImportCmd::Import(pathname); + } Index: FrameUnidraw/frameimport.h diff -c /dev/null FrameUnidraw/frameimport.h:1.1 *** /dev/null Mon May 18 16:45:10 2009 --- src/FrameUnidraw/frameimport.h Mon May 18 16:45:09 2009 *************** *** 0 **** --- 1,52 ---- + /* + * + * Copyright (c) 2009 Scott E. Johnston + * Copyright (c) 1996,1999 Vectaport Inc. + * Copyright (c) 1990, 1991 Stanford University + * + * 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. + * + */ + + /* + * FrameImportCmd - a command for importing frames + */ + + #ifndef frame_import_h + #define frame_import_h + + #include <OverlayUnidraw/ovimport.h> + + #include <stdio.h> + + //: specialized OvImportCmd for importing frames + class FrameImportCmd : public OvImportCmd { + public: + FrameImportCmd(ControlInfo*, ImportChooser* = nil); + FrameImportCmd(Editor* = nil, ImportChooser* = nil); + + virtual void Execute(); + virtual Command* Copy(); + virtual ClassId GetClassId(); + virtual boolean IsA(ClassId); + + virtual GraphicComp* Import(const char*); + }; + + #endif *** /dev/null Mon May 18 16:45:12 PDT 2009 --- patches/ivtools-090518-johnston-026 *************** patches/ivtools-090518-johnston-026 *** 0 **** --- 1 ---- + ivtools-090518-johnston-026 --Apple-Mail-40-56714919 Content-Disposition: attachment; filename=ivtools-090518-johnston-025 Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-090518-johnston-025" Content-Transfer-Encoding: 7bit Patch: ivtools-090518-johnston-025 For: ivtools-1.2 Author: [email protected] Subject: everything up to animated flowgraphs Requires: This is an intermediate patch to ivtools-1.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: Index: Attribute/attrlist.c diff -c Attribute/attrlist.c:1.7 Attribute/attrlist.c:1.8 *** Attribute/attrlist.c:1.7 Wed Oct 1 07:22:53 2008 --- src/Attribute/attrlist.c Mon May 18 16:42:50 2009 *************** *** 436,442 **** out << attrval->ulong_ref(); break; case AttributeValue::FloatType: ! out << attrval->double_ref(); break; case AttributeValue::DoubleType: out << attrval->double_ref(); --- 436,442 ---- out << attrval->ulong_ref(); break; case AttributeValue::FloatType: ! out << attrval->float_ref(); break; case AttributeValue::DoubleType: out << attrval->double_ref(); Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.14 ComTerp/comterp.c:1.15 *** ComTerp/comterp.c:1.14 Fri Feb 27 07:00:04 2009 --- src/ComTerp/comterp.c Mon May 18 16:42:52 2009 *************** *** 1132,1137 **** --- 1132,1138 ---- add_command("iterate", new IterateFunc(this)); add_command("next", new NextFunc(this)); add_command("each", new EachFunc(this)); + add_command("filter", new FilterFunc(this)); add_command("dot", new DotFunc(this)); add_command("attrname", new DotNameFunc(this)); Index: ComTerp/ctrlfunc.c diff -c ComTerp/ctrlfunc.c:1.8 ComTerp/ctrlfunc.c:1.9 *** ComTerp/ctrlfunc.c:1.8 Mon Sep 15 16:43:02 2008 --- src/ComTerp/ctrlfunc.c Mon May 18 16:42:52 2009 *************** *** 261,267 **** void SocketFunc::execute() { ! ComValue hostv(stack_arg(0, true)); ComValue portv(stack_arg(1)); reset_stack(); --- 261,267 ---- void SocketFunc::execute() { ! ComValue hostv(stack_arg(0)); ComValue portv(stack_arg(1)); reset_stack(); Index: ComTerp/strmfunc.c diff -c ComTerp/strmfunc.c:1.3 ComTerp/strmfunc.c:1.4 *** ComTerp/strmfunc.c:1.3 Fri Feb 27 07:00:04 2009 --- src/ComTerp/strmfunc.c Mon May 18 16:42:52 2009 *************** *** 476,478 **** --- 476,559 ---- } + /*****************************************************************************/ + + int FilterFunc::_symid; + + FilterFunc::FilterFunc(ComTerp* comterp) : StrmFunc(comterp) { + } + + void FilterFunc::execute() { + ComValue streamv(stack_arg_post_eval(0)); + ComValue filterv(stack_arg(1)); + reset_stack(); + + /* setup for filterenation */ + static FilterNextFunc* flfunc = nil; + + if (!flfunc) { + flfunc = new FilterNextFunc(comterp()); + flfunc->funcid(symbol_add("filter")); + } + AttributeValueList* avl = new AttributeValueList(); + avl->Append(new AttributeValue(streamv)); + avl->Append(new AttributeValue(filterv)); + ComValue stream(flfunc, avl); + stream.stream_mode(-1); // for internal use (use by FilterNextFunc) + push_stack(stream); + } + + /*****************************************************************************/ + + int FilterNextFunc::_symid; + + FilterNextFunc::FilterNextFunc(ComTerp* comterp) : StrmFunc(comterp) { + } + + void FilterNextFunc::execute() { + ComValue operand1(stack_arg(0)); + + /* invoked by next func */ + reset_stack(); + AttributeValueList* avl = operand1.stream_list(); + if (avl) { + Iterator i; + avl->First(i); + AttributeValue* strmval = avl->GetAttrVal(i); + avl->Next(i); + AttributeValue* filterval = avl->GetAttrVal(i); + + /* filter stream */ + if (strmval->is_known()) { + if (strmval->is_stream()) { + + boolean done = false; + while(!done) { + ComValue strm2filt(*strmval); + NextFunc::execute_impl(comterp(), strm2filt); + if (comterp()->stack_top().is_unknown()) { + *strmval = ComValue::nullval(); + push_stack(*strmval); + comterp()->pop_stack(); + done = true; + } else { + if (comterp()->stack_top().is_object() && + comterp()->stack_top().class_symid()==filterval->symbol_val()) + done = true; + else + comterp()->pop_stack(); + } + } + + } else { + push_stack(*strmval); + *strmval = ComValue::nullval(); + } + } + + } else + push_stack(ComValue::nullval()); + + return; + } + Index: ComTerp/strmfunc.h diff -c ComTerp/strmfunc.h:1.2 ComTerp/strmfunc.h:1.3 *** ComTerp/strmfunc.h:1.2 Fri Feb 27 07:00:05 2009 --- src/ComTerp/strmfunc.h Mon May 18 16:42:52 2009 *************** *** 146,149 **** --- 146,176 ---- return "cnt=%s(strm) -- traverse list returning its length"; } }; + //: stream filter command + class FilterFunc : public StrmFunc { + public: + FilterFunc(ComTerp*); + + virtual void execute(); + virtual boolean post_eval() { return true; } + virtual const char* docstring() { + return "val=filter(strm classid)"; } + + CLASS_SYMID("FilterFunc"); + + }; + + //: hidden func used by next command for stream filter command + class FilterNextFunc : public StrmFunc { + public: + FilterNextFunc(ComTerp*); + + virtual void execute(); + virtual const char* docstring() { + return "hidden func used by next command for filter command"; } + + CLASS_SYMID("FilterNextFunc"); + + }; + #endif /* !defined(_strmfunc_h) */ Index: DrawServ/Imakefile diff -c DrawServ/Imakefile:1.1 DrawServ/Imakefile:1.2 *** DrawServ/Imakefile:1.1 Wed Aug 29 10:39:00 2007 --- src/DrawServ/Imakefile Mon May 18 16:43:01 2009 *************** *** 24,29 **** --- 24,30 ---- #endif Obj26(drawcatalog) Obj26(drawcreator) + Obj26(drawcmds) Obj26(drawcomps) Obj26(draweditor) #ifdef AceEnabled *************** *** 45,50 **** --- 46,52 ---- #define Obj31(file) MakeObjectFromSrcFlags(file, -Div2_6_incompatible -I$(TOP)/src/include $(TOP_CCINCLUDES)) + Obj31(drawimport) Obj31(drawkit) #ifdef AceEnabled Obj31(rcdialog) Index: DrawServ/drawcatalog.c diff -c DrawServ/drawcatalog.c:1.2 DrawServ/drawcatalog.c:1.3 *** DrawServ/drawcatalog.c:1.2 Sun Sep 23 09:11:36 2007 --- src/DrawServ/drawcatalog.c Mon May 18 16:43:01 2009 *************** *** 102,108 **** char ch; while (isspace(ch = in.get())); in.putback(ch); ParamList::parse_token(in, buf, len); ! if (strcmp(buf, command) == 0) { comp = new DrawIdrawComp(in, name, _parent); _valid = in.good() && ((OverlayComp*)comp)->valid(); } else --- 102,108 ---- char ch; while (isspace(ch = in.get())); in.putback(ch); ParamList::parse_token(in, buf, len); ! if (strcmp(buf, "drawserv") == 0) { comp = new DrawIdrawComp(in, name, _parent); _valid = in.good() && ((OverlayComp*)comp)->valid(); } else Index: DrawServ/drawclasses.h diff -c DrawServ/drawclasses.h:1.1 DrawServ/drawclasses.h:1.2 *** DrawServ/drawclasses.h:1.1 Wed Aug 29 10:39:00 2007 --- src/DrawServ/drawclasses.h Mon May 18 16:43:01 2009 *************** *** 25,30 **** --- 25,31 ---- #define drawclasses_h #include <FrameUnidraw/frameclasses.h> + #include <GraphUnidraw/graphclasses.h> #define DRAW_IDRAW_COMP 9801 #define DRAW_IDRAW_VIEW Combine(DRAW_IDRAW_COMP,COMPONENT_VIEW) *************** *** 33,36 **** --- 34,40 ---- #define DRAWLINK_COMP 9802 + #define DRAWIMPORT_CMD 9803 + #define DRAWPASTE_CMD 9804 + #endif Index: DrawServ/drawcomps.c diff -c DrawServ/drawcomps.c:1.4 DrawServ/drawcomps.c:1.5 *** DrawServ/drawcomps.c:1.4 Fri May 16 10:48:04 2008 --- src/DrawServ/drawcomps.c Mon May 18 16:43:01 2009 *************** *** 31,36 **** --- 31,37 ---- #include <DrawServ/drawclasses.h> #include <FrameUnidraw/framefile.h> #include <GraphUnidraw/graphclasses.h> + #include <GraphUnidraw/nodecomp.h> #include <OverlayUnidraw/paramlist.h> #include <Unidraw/clipboard.h> #include <Unidraw/iterator.h> *************** *** 143,150 **** Iterator j; for(comp->First(j); !comp->Done(j); comp->Next(j)) { GraphicComp* subcomp = comp->GetComp(j); ! if (subcomp->IsA(NODE_COMP)) num_node++; else if (subcomp->IsA(EDGE_COMP)) num_edge++; } --- 144,153 ---- Iterator j; for(comp->First(j); !comp->Done(j); comp->Next(j)) { GraphicComp* subcomp = comp->GetComp(j); ! if (subcomp->IsA(NODE_COMP)) { ! ((NodeComp*)subcomp)->index(num_node); num_node++; + } else if (subcomp->IsA(EDGE_COMP)) num_edge++; } Index: DrawServ/drawkit.c diff -c DrawServ/drawkit.c:1.3 DrawServ/drawkit.c:1.4 *** DrawServ/drawkit.c:1.3 Sun Sep 30 13:49:23 2007 --- src/DrawServ/drawkit.c Mon May 18 16:43:01 2009 *************** *** 30,35 **** --- 30,36 ---- #include <DrawServ/drawkit.h> #include <DrawServ/drawcomps.h> #include <DrawServ/draweditor.h> + #include <DrawServ/drawimport.h> #include <DrawServ/drawlinklist.h> #include <DrawServ/drawserv.h> #include <DrawServ/linkselection.h> *************** *** 42,48 **** #include <GraphUnidraw/graphcmds.h> #include <GraphUnidraw/graphcomp.h> #include <GraphUnidraw/grapheditor.h> - #include <GraphUnidraw/graphimport.h> #include <GraphUnidraw/graphkit.h> #include <OverlayUnidraw/annotate.h> --- 43,48 ---- *************** *** 157,163 **** "Save As... "); MakeMenu(mbi, new OvPrintCmd(new ControlInfo("Print...", KLBL_PRINT, CODE_PRINT)), "Print... "); ! MakeMenu(mbi, new OvImportCmd(new ControlInfo("Import Graphic...", KLBL_IMPORT, CODE_IMPORT)), "Import Graphic... "); --- 157,163 ---- "Save As... "); MakeMenu(mbi, new OvPrintCmd(new ControlInfo("Print...", KLBL_PRINT, CODE_PRINT)), "Print... "); ! MakeMenu(mbi, new DrawImportCmd(new ControlInfo("Import Graphic...", KLBL_IMPORT, CODE_IMPORT)), "Import Graphic... "); Index: FrameUnidraw/Imakefile diff -c FrameUnidraw/Imakefile:1.1 FrameUnidraw/Imakefile:1.2 *** FrameUnidraw/Imakefile:1.1 Wed Aug 29 10:38:56 2007 --- src/FrameUnidraw/Imakefile Mon May 18 16:42:59 2009 *************** *** 29,34 **** --- 29,35 ---- #define Obj31(file) MakeObjectFromSrcFlags(file, -Div2_6_incompatible -I$(TOP)/src/include $(TOP_CCINCLUDES)) + Obj31(frameimport) Obj31(framekit) Obj31(framestates) Index: FrameUnidraw/framecatalog.c diff -c FrameUnidraw/framecatalog.c:1.1 FrameUnidraw/framecatalog.c:1.2 *** FrameUnidraw/framecatalog.c:1.1 Wed Aug 29 10:38:56 2007 --- src/FrameUnidraw/framecatalog.c Mon May 18 16:42:59 2009 *************** *** 45,50 **** --- 45,51 ---- FrameCatalog::FrameCatalog ( const char* name, Creator* creator ) : OverlayCatalog(name, creator) { + _import = false; } boolean FrameCatalog::Retrieve (const char* pathname, Component*& comp) { Index: FrameUnidraw/framecatalog.h diff -c FrameUnidraw/framecatalog.h:1.1 FrameUnidraw/framecatalog.h:1.2 *** FrameUnidraw/framecatalog.h:1.1 Wed Aug 29 10:38:56 2007 --- src/FrameUnidraw/framecatalog.h Mon May 18 16:42:59 2009 *************** *** 42,47 **** --- 42,55 ---- // specialized method to ensure a FrameOverlaysComp gets constructed // whenever a composite-graphic is de-serialized (as opposed to // just a plain OverlaysComp). + + void SetImport(boolean); + // set flag that indicates read is for import instead of an open. + + protected: + boolean _import; }; + inline void FrameCatalog::SetImport(boolean v) { _import = v; } + #endif Index: FrameUnidraw/frameclasses.h diff -c FrameUnidraw/frameclasses.h:1.1 FrameUnidraw/frameclasses.h:1.2 *** FrameUnidraw/frameclasses.h:1.1 Wed Aug 29 10:38:56 2007 --- src/FrameUnidraw/frameclasses.h Mon May 18 16:42:59 2009 *************** *** 49,54 **** --- 49,56 ---- #define COPYMOVEFRAME_CMD 8069 #define SHOWOTHERFRAME_CMD 8070 #define AUTONEWFRAME_CMD 8071 + #define FRAMEIMPORT_CMD 8072 + #define FRAMEPASTE_CMD 8073 #define FRAME_OVERLAYS_VIEW Combine(FRAME_OVERLAYS_COMP, COMPONENT_VIEW) #define FRAME_VIEW Combine(FRAME_COMP, COMPONENT_VIEW) Index: FrameUnidraw/framecmds.c diff -c FrameUnidraw/framecmds.c:1.2 FrameUnidraw/framecmds.c:1.3 *** FrameUnidraw/framecmds.c:1.2 Sun Sep 23 09:11:34 2007 --- src/FrameUnidraw/framecmds.c Mon May 18 16:42:59 2009 *************** *** 1,4 **** --- 1,5 ---- /* + * Copyright (c) 2009 Scott E. Johnston * Copyright (c) 1997-2000 Vectaport Inc. * Copyright (c) 1994, 1995 Vectaport Inc., Cider Press * *************** *** 833,835 **** --- 834,920 ---- implementActionCallback(AutoNewFrameCmd) + /*****************************************************************************/ + + ClassId FramePasteCmd::GetClassId () { return FRAMEPASTE_CMD; } + + boolean FramePasteCmd::IsA (ClassId id) { + return FRAMEPASTE_CMD==id || MacroCmd::IsA(id); + } + + FramePasteCmd::FramePasteCmd (ControlInfo* c, Clipboard* cb) : MacroCmd(c) { + SetClipboard(cb); + _executed = 0; + } + + FramePasteCmd::FramePasteCmd (Editor* ed, Clipboard* cb) : MacroCmd(ed) { + SetClipboard(cb); + _executed = 0; + } + + FramePasteCmd::~FramePasteCmd () { + } + + Command* FramePasteCmd::Copy () { + Command* copy = new FramePasteCmd(CopyControlInfo(), DeepCopyClipboard()); + InitCopy(copy); + return copy; + } + + void FramePasteCmd::Execute () { + if(!_executed) { + Clipboard* cb = GetClipboard(); + Iterator it; + cb->First(it); + GraphicComp* gcomp = cb->GetComp(it); + cb->Next(it); + if(cb->Done(it) && gcomp->IsA(FRAME_IDRAW_COMP)) + { + gcomp->First(it); + + /* move to background frame */ + FrameEditor* ed = (FrameEditor*)GetEditor(); + FrameNumberState* fnumstate = ed->framenumstate(); + int origfnum = fnumstate->framenumber(); + int currfnum = 0; + Append(new MoveFrameCmd(ed, -origfnum, true /* allowbg */)); + + /* paste contents of background frame */ + FrameComp* fcomp = (FrameComp*) (gcomp->GetComp(it)->IsA(FRAME_COMP) ? gcomp->GetComp(it) : nil); + if (fcomp) { + + while(!gcomp->Done(it)) { + gcomp->Remove(it); + Clipboard* newcb = new Clipboard(); + Iterator jt; + fcomp->First(jt); + while(!fcomp->Done(jt)) { + newcb->Append(fcomp->GetComp(jt)); + fcomp->Remove(jt); + } + Append(new PasteCmd(ed, newcb)); + delete fcomp; + + /* while more frames move to next frame and paste (create new frame if necessary) */ + if(!gcomp->Done(it)) { + currfnum++; + fcomp = (FrameComp*) (gcomp->GetComp(it)->IsA(FRAME_COMP) ? gcomp->GetComp(it) : nil); + if(currfnum>=ed->NumFrames()) + Append(new CreateMoveFrameCmd(ed)); + else + Append(new MoveFrameCmd(ed, 1, true /* allowbg */)); + } + } + } + + /* move to original frame */ + Append(new MoveFrameCmd(ed, origfnum-currfnum, true /* allowbg */)); + } + + else + Append(new PasteCmd(GetEditor(), cb->Copy())); + } + MacroCmd::Execute(); + _executed = 1; + } + Index: FrameUnidraw/framecmds.h diff -c FrameUnidraw/framecmds.h:1.1 FrameUnidraw/framecmds.h:1.2 *** FrameUnidraw/framecmds.h:1.1 Wed Aug 29 10:38:56 2007 --- src/FrameUnidraw/framecmds.h Mon May 18 16:42:59 2009 *************** *** 1,4 **** --- 1,5 ---- /* + * Copyright (c) 2009 Scott E. Johnston * Copyright (c) 1994, 1995, 1999 Vectaport Inc. * * Permission to use, copy, modify, distribute, and sell this software and *************** *** 325,328 **** --- 326,346 ---- declareActionCallback(AutoNewFrameCmd) + //: specialized PasteCmd for flipbook + class FramePasteCmd : public MacroCmd { + public: + FramePasteCmd(ControlInfo*, Clipboard* = nil); + FramePasteCmd(Editor* = nil, Clipboard* = nil); + virtual ~FramePasteCmd(); + + virtual void Execute(); + + virtual Command* Copy(); + virtual ClassId GetClassId(); + virtual boolean IsA(ClassId); + + protected: + int _executed; + }; + #endif Index: FrameUnidraw/framekit.c diff -c FrameUnidraw/framekit.c:1.2 FrameUnidraw/framekit.c:1.3 *** FrameUnidraw/framekit.c:1.2 Thu Oct 9 07:18:51 2008 --- src/FrameUnidraw/framekit.c Mon May 18 16:42:59 2009 *************** *** 31,36 **** --- 31,37 ---- #include <FrameUnidraw/framecmds.h> #include <FrameUnidraw/framecomps.h> #include <FrameUnidraw/frameeditor.h> + #include <FrameUnidraw/frameimport.h> #include <FrameUnidraw/framekit.h> #include <FrameUnidraw/framestates.h> #include <FrameUnidraw/frameviewer.h> *************** *** 40,46 **** #include <OverlayUnidraw/ovcmds.h> #include <OverlayUnidraw/ovexport.h> #include <OverlayUnidraw/ovfixview.h> - #include <OverlayUnidraw/ovimport.h> #include <OverlayUnidraw/ovpage.h> #include <OverlayUnidraw/ovprecise.h> #include <OverlayUnidraw/ovprint.h> --- 41,46 ---- *************** *** 302,308 **** "Save As... "); MakeMenu(mbi, new OvPrintCmd(new ControlInfo("Print...", KLBL_PRINT, CODE_PRINT)), "Print... "); ! MakeMenu(mbi, new OvImportCmd(new ControlInfo("Import Graphic...", KLBL_IMPORT, CODE_IMPORT)), "Import Graphic... "); --- 302,308 ---- "Save As... "); MakeMenu(mbi, new OvPrintCmd(new ControlInfo("Print...", KLBL_PRINT, CODE_PRINT)), "Print... "); ! MakeMenu(mbi, new FrameImportCmd(new ControlInfo("Import Graphic...", KLBL_IMPORT, CODE_IMPORT)), "Import Graphic... "); Index: GraphUnidraw/edgecomp.c diff -c GraphUnidraw/edgecomp.c:1.5 GraphUnidraw/edgecomp.c:1.6 *** GraphUnidraw/edgecomp.c:1.5 Thu Nov 15 14:18:10 2007 --- src/GraphUnidraw/edgecomp.c Mon May 18 16:43:00 2009 *************** *** 923,928 **** --- 923,929 ---- } int EdgeScript::IndexNode (NodeComp *comp) { + #if 0 GraphicComp* comps = (GraphicComp*)GetSubject()->GetParent(); Iterator i; int index = -1; *************** *** 935,940 **** --- 936,945 ---- return index; } return -1; + #else + return comp->index(); + #endif + } Index: GraphUnidraw/graphcomp.c diff -c GraphUnidraw/graphcomp.c:1.2 GraphUnidraw/graphcomp.c:1.3 *** GraphUnidraw/graphcomp.c:1.2 Fri Sep 28 13:08:35 2007 --- src/GraphUnidraw/graphcomp.c Mon May 18 16:43:00 2009 *************** *** 497,504 **** int num_node = 0; for (comps->First(i); !comps->Done(i); comps->Next(i)) { GraphicComp* comp = comps->GetComp(i); ! if (comp->IsA(NODE_COMP)) num_node++; if (comp->IsA(EDGE_COMP)) num_edge++; } --- 497,506 ---- int num_node = 0; for (comps->First(i); !comps->Done(i); comps->Next(i)) { GraphicComp* comp = comps->GetComp(i); ! if (comp->IsA(NODE_COMP)) { ! ((NodeComp*)comp)->index(num_node); num_node++; + } if (comp->IsA(EDGE_COMP)) num_edge++; } Index: GraphUnidraw/graphimport.c diff -c GraphUnidraw/graphimport.c:1.1 GraphUnidraw/graphimport.c:1.2 *** GraphUnidraw/graphimport.c:1.1 Wed Aug 29 10:38:58 2007 --- src/GraphUnidraw/graphimport.c Mon May 18 16:43:00 2009 *************** *** 59,71 **** } Command* GraphImportCmd::Copy () { ! GraphImportCmd* copy = new GraphImportCmd(CopyControlInfo()); InitCopy(copy); return copy; } void GraphImportCmd::Execute () { ! GraphComp* comps = (GraphComp*)PostDialog(); Clipboard* cb; if (comps != nil) { --- 59,71 ---- } Command* GraphImportCmd::Copy () { ! GraphImportCmd* copy = new GraphImportCmd(CopyControlInfo(), chooser_); InitCopy(copy); return copy; } void GraphImportCmd::Execute () { ! GraphicComp* comps = PostDialog(); Clipboard* cb; if (comps != nil) { Index: GraphUnidraw/nodecomp.c diff -c GraphUnidraw/nodecomp.c:1.11 GraphUnidraw/nodecomp.c:1.12 *** GraphUnidraw/nodecomp.c:1.11 Sat Nov 8 10:10:54 2008 --- src/GraphUnidraw/nodecomp.c Mon May 18 16:43:00 2009 *************** *** 521,526 **** --- 521,527 ---- NodeTextCmd* ntcmd = (NodeTextCmd*)cmd; TextGraphic* tg = ntcmd->Graphic(); SetText(tg); + _reqlabel = 1; Notify(); unidraw->Update(); } else if (cmd->IsA(ALIGN_CMD)) { Index: GraphUnidraw/nodecomp.h diff -c GraphUnidraw/nodecomp.h:1.6 GraphUnidraw/nodecomp.h:1.7 *** GraphUnidraw/nodecomp.h:1.6 Thu Oct 9 07:18:52 2008 --- src/GraphUnidraw/nodecomp.h Mon May 18 16:43:00 2009 *************** *** 130,135 **** --- 130,137 ---- // return pointer to NodeView of this component in given viewer. boolean RequireLabel() { return _reqlabel; } // flag to indicate whether node must have label (text graphic). + void RequireLabel(boolean flag) { _reqlabel = flag; } + // flag to indicate whether node must have label (text graphic). #if 0 void update(Observable*); *************** *** 165,175 **** --- 167,183 ---- // return pointer to node on other side of nth outgoing edge. virtual boolean operator == (OverlayComp&); + + void index(int i) {_index = i; } + // set temporary index for writing to file + int index() { return _index; } + // get temporary index for writing to file protected: GraphComp* _graph; TopoNode* _node; boolean _reqlabel; + int _index; protected: ParamList* GetParamList(); Index: IVGlyph/ofilechooser.h diff -c IVGlyph/ofilechooser.h:1.1 IVGlyph/ofilechooser.h:1.2 *** IVGlyph/ofilechooser.h:1.1 Wed Aug 29 10:38:07 2007 --- src/IVGlyph/ofilechooser.h Mon May 18 16:42:54 2009 *************** *** 36,41 **** --- 36,42 ---- #include <OS/directory.h> #include <InterViews/action.h> #include <IV-look/field.h> + #include <IV-3_1/InterViews/dialog.h> #include <InterViews/_enter.h> Index: OverlayUnidraw/ovimport.c diff -c OverlayUnidraw/ovimport.c:1.4 OverlayUnidraw/ovimport.c:1.5 *** OverlayUnidraw/ovimport.c:1.4 Fri May 16 10:47:55 2008 --- src/OverlayUnidraw/ovimport.c Mon May 18 16:42:58 2009 *************** *** 1191,1198 **** boolean OvImportCmd::Reversible () { return false; } ! ::Command* OvImportCmd::Copy () { ! OvImportCmd* copy = new OvImportCmd(CopyControlInfo()); InitCopy(copy); copy->preserve_selection(preserve_selection_); return copy; --- 1191,1198 ---- boolean OvImportCmd::Reversible () { return false; } ! Command* OvImportCmd::Copy () { ! OvImportCmd* copy = new OvImportCmd(CopyControlInfo(), chooser_); InitCopy(copy); copy->preserve_selection(preserve_selection_); return copy; Index: top_ivtools/MANIFEST diff -c top_ivtools/MANIFEST:1.4 top_ivtools/MANIFEST:1.5 *** top_ivtools/MANIFEST:1.4 Fri Feb 27 07:00:02 2009 --- ./MANIFEST Mon May 18 16:42:49 2009 *************** *** 282,287 **** --- 282,289 ---- ivtools-1.2/src/DrawServ/drawcatalog.c ivtools-1.2/src/DrawServ/drawcatalog.h ivtools-1.2/src/DrawServ/drawclasses.h + ivtools-1.2/src/DrawServ/drawcmds.c + ivtools-1.2/src/DrawServ/drawcmds.h ivtools-1.2/src/DrawServ/drawcomps.c ivtools-1.2/src/DrawServ/drawcomps.h ivtools-1.2/src/DrawServ/drawcreator.c *************** *** 290,295 **** --- 292,299 ---- ivtools-1.2/src/DrawServ/draweditor.h ivtools-1.2/src/DrawServ/drawfunc.c ivtools-1.2/src/DrawServ/drawfunc.h + ivtools-1.2/src/DrawServ/drawimport.c + ivtools-1.2/src/DrawServ/drawimport.h ivtools-1.2/src/DrawServ/drawkit.c ivtools-1.2/src/DrawServ/drawkit.h ivtools-1.2/src/DrawServ/drawlink.c *************** *** 331,336 **** --- 335,342 ---- ivtools-1.2/src/FrameUnidraw/framefile.h ivtools-1.2/src/FrameUnidraw/framefunc.c ivtools-1.2/src/FrameUnidraw/framefunc.h + ivtools-1.2/src/FrameUnidraw/frameimport.c + ivtools-1.2/src/FrameUnidraw/frameimport.h ivtools-1.2/src/FrameUnidraw/framekit.c ivtools-1.2/src/FrameUnidraw/framekit.h ivtools-1.2/src/FrameUnidraw/frameps.c Index: top_ivtools/MANIFEST.perceps diff -c top_ivtools/MANIFEST.perceps:1.3 top_ivtools/MANIFEST.perceps:1.4 *** top_ivtools/MANIFEST.perceps:1.3 Fri Feb 27 07:00:02 2009 --- ./MANIFEST.perceps Mon May 18 16:42:49 2009 *************** *** 70,80 **** --- 70,82 ---- DrawServ/ackback-handler.h DrawServ/drawcatalog.h DrawServ/drawclasses.h + DrawServ/drawcmds.h DrawServ/drawcomps.h DrawServ/drawcreator.h DrawServ/draweditor.h DrawServ/drawfunc.h DrawServ/drawkit.h + DrawServ/drawimport.h DrawServ/drawlink.h DrawServ/drawlinkcomp.h DrawServ/drawlinklist.h *************** *** 92,97 **** --- 94,100 ---- FrameUnidraw/frameeditor.h FrameUnidraw/framefile.h FrameUnidraw/framefunc.h + FrameUnidraw/frameimport.h FrameUnidraw/framekit.h FrameUnidraw/frameps.h FrameUnidraw/framescripts.h Index: TopoFace/topoedge.c diff -c TopoFace/topoedge.c:1.1 TopoFace/topoedge.c:1.2 *** TopoFace/topoedge.c:1.1 Wed Aug 29 10:37:47 2007 --- src/TopoFace/topoedge.c Mon May 18 16:42:51 2009 *************** *** 48,53 **** --- 48,64 ---- _end = end; } + void TopoEdge::remove_nodes() { + if (_start) { + _start->remove(this); + _start = nil; + } + if (_end) { + _end->remove(this); + _end = nil; + } + } + void TopoEdge::attach_start_node(TopoNode* start) { if (_start) _start->remove(this); Index: TopoFace/topoedge.h diff -c TopoFace/topoedge.h:1.1 TopoFace/topoedge.h:1.2 *** TopoFace/topoedge.h:1.1 Wed Aug 29 10:37:47 2007 --- src/TopoFace/topoedge.h Mon May 18 16:42:51 2009 *************** *** 36,41 **** --- 36,43 ---- ~TopoEdge(); void attach_nodes(TopoNode* start, TopoNode* end); + void remove_nodes(); + void attach_faces(TopoFace* left, TopoFace* right); void attach_start_node(TopoNode* start); Index: UniIdraw/idarrows.c diff -c UniIdraw/idarrows.c:1.1 UniIdraw/idarrows.c:1.2 *** UniIdraw/idarrows.c:1.1 Wed Aug 29 10:38:46 2007 --- src/UniIdraw/idarrows.c Mon May 18 16:42:57 2009 *************** *** 236,241 **** --- 236,253 ---- ClassId ArrowLine::CompId () { return ARROWLINE_COMP; } + void ArrowLine::GetHead(float &x, float &y) { + FullGraphic gs; + totalGS(gs); + transform(float(_x0), float(_y0), x, y, &gs); + } + + void ArrowLine::GetTail(float &x, float &y) { + FullGraphic gs; + totalGS(gs); + transform(float(_x1), float(_y1), x, y, &gs); + } + /****************************************************************************/ ArrowMultiLine::ArrowMultiLine ( Index: UniIdraw/idarrows.h diff -c UniIdraw/idarrows.h:1.1 UniIdraw/idarrows.h:1.2 *** UniIdraw/idarrows.h:1.1 Wed Aug 29 10:38:46 2007 --- src/UniIdraw/idarrows.h Mon May 18 16:42:57 2009 *************** *** 47,52 **** --- 47,55 ---- void SetOriginal(IntCoord x0, IntCoord y0, IntCoord x1, IntCoord y1); + void GetHead(float &x, float &y); + void GetTail(float &x, float &y); + void SetArrows(boolean h, boolean t); void ScaleArrows(float); boolean Head(); *** /dev/null Mon May 18 16:43:04 PDT 2009 --- patches/ivtools-090518-johnston-025 *************** patches/ivtools-090518-johnston-025 *** 0 **** --- 1 ---- + ivtools-090518-johnston-025 --Apple-Mail-40-56714919 Content-Disposition: attachment; filename=ivtools-090227-johnston-024 Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-090227-johnston-024" Content-Transfer-Encoding: 7bit Patch: ivtools-090227-johnston-024 For: ivtools-1.2 Author: [email protected] Subject: ipl required changes, symstr, ctoi, isspace funcs Requires: This is an intermediate patch to ivtools-1.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: Index: ComTerp/Imakefile diff -c ComTerp/Imakefile:1.1 ComTerp/Imakefile:1.2 *** ComTerp/Imakefile:1.1 Wed Aug 29 10:37:48 2007 --- src/ComTerp/Imakefile Fri Feb 27 07:00:04 2009 *************** *** 21,26 **** --- 21,27 ---- Obj(bitfunc) Obj(boolfunc) Obj(bquotefunc) + Obj(charfunc) Obj(comfunc) ObjA(comterpserv) Obj(comvalue) Index: ComTerp/assignfunc.c diff -c ComTerp/assignfunc.c:1.4 ComTerp/assignfunc.c:1.5 *** ComTerp/assignfunc.c:1.4 Fri May 16 10:47:37 2008 --- src/ComTerp/assignfunc.c Fri Feb 27 07:00:04 2009 *************** *** 46,55 **** void AssignFunc::execute() { ComValue operand1(stack_arg(0, true)); if (operand1.type() != ComValue::SymbolType) { ! operand1.assignval(stack_arg_post_eval(0, true /* no symbol lookup */)); } ! ComValue* operand2 = new ComValue(stack_arg_post_eval(1, true /* no symbol lookup */)); if (operand2->is_attribute()) lookup_symval(*operand2); reset_stack(); if (operand1.type() == ComValue::SymbolType) { AttributeList* attrlist = comterp()->get_attributes(); --- 46,59 ---- void AssignFunc::execute() { ComValue operand1(stack_arg(0, true)); if (operand1.type() != ComValue::SymbolType) { ! operand1.assignval(stack_arg_post_eval(0, true /* no symbol or attribute lookup */)); } ! ComValue* operand2 = new ComValue(stack_arg_post_eval(1, true /* no symbol or attribute lookup */)); ! #ifdef POSTEVAL_EXPERIMENT ! if (operand2->is_attribute() || operand2->is_symbol()) lookup_symval(*operand2); ! #else if (operand2->is_attribute()) lookup_symval(*operand2); + #endif reset_stack(); if (operand1.type() == ComValue::SymbolType) { AttributeList* attrlist = comterp()->get_attributes(); Index: ComTerp/comfunc.c diff -c ComTerp/comfunc.c:1.4 ComTerp/comfunc.c:1.5 *** ComTerp/comfunc.c:1.4 Thu Nov 15 14:18:04 2007 --- src/ComTerp/comfunc.c Fri Feb 27 07:00:04 2009 *************** *** 144,150 **** skip_arg_in_expr(offtop, argcnt); } ! comterp()->post_eval_expr(argcnt, offtop, pedepth()+1); return comterp()->pop_stack(!symbol); } --- 144,154 ---- skip_arg_in_expr(offtop, argcnt); } ! comterp()->post_eval_expr(argcnt, offtop, pedepth()+1 ! #ifdef POSTEVAL_EXPERIMENT ! , symbol ! #endif ! ); return comterp()->pop_stack(!symbol); } Index: ComTerp/comhandler.c diff -c ComTerp/comhandler.c:1.5 ComTerp/comhandler.c:1.6 *** ComTerp/comhandler.c:1.5 Mon Sep 15 16:43:02 2008 --- src/ComTerp/comhandler.c Fri Feb 27 07:00:04 2009 *************** *** 219,225 **** } if (!ComterpHandler::logger_mode()) { comterp_->load_string(inbuf); ! if (fd>0 && (!comterp_->_muted || strncmp(inbuf, "ready", 5)!=0)) cerr << "(" << fd << "): " << inbuf << "\n"; comterp_->_fd = fd; comterp_->_outfunc = (outfuncptr)&ComTerpServ::fd_fputs; --- 219,225 ---- } if (!ComterpHandler::logger_mode()) { comterp_->load_string(inbuf); ! if (fd>0 && (!comterp_->_muted || strncmp(inbuf, "ready", 5)!=0)) cerr << "(" << fd << "): " << inbuf << "\n"; comterp_->_fd = fd; comterp_->_outfunc = (outfuncptr)&ComTerpServ::fd_fputs; Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.13 ComTerp/comterp.c:1.14 *** ComTerp/comterp.c:1.13 Sat Nov 8 10:10:48 2008 --- src/ComTerp/comterp.c Fri Feb 27 07:00:04 2009 *************** *** 1,5 **** /* ! * Copyright (c) 2001-2007 Scott E. Johnston * Copyright (c) 2000 IET Inc. * Copyright (c) 1994-1998 Vectaport Inc. * --- 1,5 ---- /* ! * Copyright (c) 2001-2009 Scott E. Johnston * Copyright (c) 2000 IET Inc. * Copyright (c) 1994-1998 Vectaport Inc. * *************** *** 41,46 **** --- 41,47 ---- #include <ComTerp/bitfunc.h> #include <ComTerp/boolfunc.h> #include <ComTerp/bquotefunc.h> + #include <ComTerp/charfunc.h> #include <ComTerp/comfunc.h> #include <ComTerp/comterp.h> #include <ComTerp/comterpserv.h> *************** *** 221,227 **** return FUNCOK; } ! boolean ComTerp::top_expr() { return _pfoff >= _pfnum; } int ComTerp::eval_expr(ComValue* pfvals, int npfvals) { #if 0 --- 222,228 ---- return FUNCOK; } ! boolean ComTerp::top_expr() { return _pfoff >= _pfnum && NextFunc::next_depth()<=1; } int ComTerp::eval_expr(ComValue* pfvals, int npfvals) { #if 0 *************** *** 280,293 **** } if (has_streams) { AttributeValueList* avl = new AttributeValueList(); for(int i=0; i<sv.narg()+sv.nkey(); i++) { - #ifdef STREAMS_FOR_IPL ComValue topval(pop_stack(i==streamid)); - #else - ComValue topval(pop_stack(true)); - #endif avl->Prepend(new AttributeValue(topval)); } ComValue val(sv.obj_val(), avl); val.stream_mode(1); // for external use push_stack(val); --- 281,298 ---- } if (has_streams) { AttributeValueList* avl = new AttributeValueList(); + + /* if delims associated with symbol, put that first in stream list */ + if (_delim_func && sv.nids()!=1) { + ComValue nameval(sv.command_symid(), ComValue::SymbolType); + avl->Prepend(new AttributeValue(nameval)); + } + for(int i=0; i<sv.narg()+sv.nkey(); i++) { ComValue topval(pop_stack(i==streamid)); avl->Prepend(new AttributeValue(topval)); } + ComValue val(sv.obj_val(), avl); val.stream_mode(1); // for external use push_stack(val); *************** *** 525,531 **** } ! int ComTerp::post_eval_expr(int tokcnt, int offtop, int pedepth) { if (tokcnt) { int offset = _pfnum+offtop; while (tokcnt>0) { --- 530,543 ---- } ! int ComTerp::post_eval_expr(int tokcnt, int offtop, int pedepth ! #ifdef POSTEVAL_EXPERIMENT ! , int nolookup ! #endif ! ) { ! #ifdef POSTEVAL_EXPERIMENT ! int numtok = tokcnt; ! #endif if (tokcnt) { int offset = _pfnum+offtop; while (tokcnt>0) { *************** *** 557,563 **** if (stack_top().is_type(ComValue::CommandType) && stack_top().pedepth() == pedepth) break; } ! // if (!stack_top().is_symbol()) eval_expr_internals(pedepth); } --- 569,577 ---- if (stack_top().is_type(ComValue::CommandType) && stack_top().pedepth() == pedepth) break; } ! #ifdef POSTEVAL_EXPERIMENT ! if (!(stack_top().is_symbol()&&numtok==1&&nolookup)) ! #endif eval_expr_internals(pedepth); } *************** *** 1016,1026 **** } else if (!func_for_next_expr() && val_for_next_func().is_null() && !muted()) { if (stack_top().is_stream() && autostream()) { ComValue streamv(stack_top()); - NextFunc nextfunc(this); do { pop_stack(); ! push_stack(streamv); ! nextfunc.exec(1, 0); if (stack_top().is_known()) { print_stack_top(out); out << "\n"; out.flush(); --- 1030,1038 ---- } else if (!func_for_next_expr() && val_for_next_func().is_null() && !muted()) { if (stack_top().is_stream() && autostream()) { ComValue streamv(stack_top()); do { pop_stack(); ! NextFunc::execute_impl(this, streamv); if (stack_top().is_known()) { print_stack_top(out); out << "\n"; out.flush(); *************** *** 1177,1182 **** --- 1189,1195 ---- add_command("symval", new SymValFunc(this)); add_command("symbol", new SymbolFunc(this)); add_command("symadd", new SymAddFunc(this)); + add_command("symstr", new SymStrFunc(this)); add_command("global", new GlobalSymbolFunc(this)); add_command("split", new SplitStrFunc(this)); add_command("join", new JoinStrFunc(this)); *************** *** 1205,1210 **** --- 1218,1227 ---- add_command("quit", new QuitFunc(this)); add_command("exit", new ExitFunc(this)); add_command("mute", new MuteFunc(this)); + + add_command("ctoi", new CtoiFunc(this)); + add_command("isspace", new IsSpaceFunc(this)); + } } Index: ComTerp/comterp.h diff -c ComTerp/comterp.h:1.5 ComTerp/comterp.h:1.6 *** ComTerp/comterp.h:1.5 Sat Nov 8 10:10:48 2008 --- src/ComTerp/comterp.h Fri Feb 27 07:00:04 2009 *************** *** 31,36 **** --- 31,38 ---- #if !defined(_comterp_h) #define _comterp_h + // #define POSTEVAL_EXPERIMENT + #include <ComTerp/parser.h> #include <OS/table.h> *************** *** 89,95 **** // 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. boolean top_expr(); // return true if the topmost expression is currently being evaluated --- 91,101 ---- // 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 ! #ifdef POSTEVAL_EXPERIMENT ! , int nolookup=false ! #endif ! ); // copy unevaluated expression to the stack and evaluate. boolean top_expr(); // return true if the topmost expression is currently being evaluated *************** *** 410,414 **** }; - //#define STREAMS_FOR_IPL #endif /* !defined(_comterp_h) */ --- 416,419 ---- Index: ComTerp/strmfunc.c diff -c ComTerp/strmfunc.c:1.2 ComTerp/strmfunc.c:1.3 *** ComTerp/strmfunc.c:1.2 Sat Nov 8 10:10:48 2008 --- src/ComTerp/strmfunc.c Fri Feb 27 07:00:04 2009 *************** *** 339,361 **** /*****************************************************************************/ NextFunc::NextFunc(ComTerp* comterp) : StrmFunc(comterp) { } void NextFunc::execute() { - #ifdef STREAMS_FOR_IPL - ComValue streamv(stack_arg(0)); - #else ComValue streamv(stack_arg_post_eval(0)); - #endif reset_stack(); execute_impl(comterp(), streamv); } void NextFunc::execute_impl(ComTerp* comterp, ComValue& streamv) { ! if (!streamv.is_stream()) return; int outside_stackh = comterp->stack_height(); --- 339,363 ---- /*****************************************************************************/ + int NextFunc::_next_depth = 0; + NextFunc::NextFunc(ComTerp* comterp) : StrmFunc(comterp) { } void NextFunc::execute() { ComValue streamv(stack_arg_post_eval(0)); reset_stack(); execute_impl(comterp(), streamv); } void NextFunc::execute_impl(ComTerp* comterp, ComValue& streamv) { + _next_depth++; ! if (!streamv.is_stream()) { ! _next_depth--; ! return; ! } int outside_stackh = comterp->stack_height(); *************** *** 408,413 **** --- 410,416 ---- streamv.stream_list()->clear(); while (comterp->stack_height()>outside_stackh) comterp->pop_stack(); comterp->push_stack(ComValue::nullval()); + _next_depth--; return; } else if (comterp->stack_height()==inside_stackh) comterp->push_stack(ComValue::blankval()); *************** *** 438,443 **** --- 441,448 ---- } else comterp->push_stack(ComValue::nullval()); + + _next_depth--; } Index: ComTerp/strmfunc.h diff -c ComTerp/strmfunc.h:1.1 ComTerp/strmfunc.h:1.2 *** ComTerp/strmfunc.h:1.1 Wed Aug 29 10:37:49 2007 --- src/ComTerp/strmfunc.h Fri Feb 27 07:00:05 2009 *************** *** 128,133 **** --- 128,137 ---- virtual const char* docstring() { return "val=%s(stream) -- return next value from stream"; } + static int next_depth() { return _next_depth; } + protected: + static int _next_depth; + }; //: traverse stream command for ComTerp. Index: comterp_/README diff -c comterp_/README:1.4 comterp_/README:1.5 *** comterp_/README:1.4 Sat Nov 8 10:10:49 2008 --- src/comterp_/README Fri Feb 27 07:00:06 2009 *************** *** 287,292 **** --- 287,296 ---- sym|lst=class(val [val ...]) -- return class symbol(s) for value(s) of object type + int=ctoi(char) -- convert character to integer + + flag=isspace(char) -- return true if character is whitespace + ONLY IN SERVER MODE str=timeexpr(comstr :sec n) -- command string to execute at intervals Index: ComUtil/_parser.c diff -c ComUtil/_parser.c:1.4 ComUtil/_parser.c:1.5 *** ComUtil/_parser.c:1.4 Sat Nov 8 10:10:47 2008 --- src/ComUtil/_parser.c Fri Feb 27 07:00:03 2009 *************** *** 32,38 **** History: Written by Scott E. Johnston, April 1989 */ ! // #define DYNAMIC_COMMANDS #include <stdio.h> #include <string.h> --- 32,38 ---- History: Written by Scott E. Johnston, April 1989 */ ! #define DYNAMIC_COMMANDS #include <stdio.h> #include <string.h> *************** *** 88,93 **** --- 88,94 ---- /* Parenthesis stack macros */ #define INITIAL_PAREN_STACK_SIZE 32 + #ifdef PAREN_STACK_EXPERIMENT #define PARENSTK_PUSH( paren_val, comm_val, nids_val ) {\ if( ++TopOfParenStack == SizeOfParenStack ) {\ SizeOfParenStack *= 2;\ *************** *** 99,106 **** ParenStack[TopOfParenStack].narg = 0;\ ParenStack[TopOfParenStack].nkey = 0;\ ParenStack[TopOfParenStack].nids = nids_val;\ ParenStack[TopOfParenStack].comm_id = comm_val;} ! /* Operator stack macros */ #define INITIAL_OPER_STACK_SIZE 32 #define OPERSTK_PUSH( oper_id, type_val ) {\ --- 100,121 ---- ParenStack[TopOfParenStack].narg = 0;\ ParenStack[TopOfParenStack].nkey = 0;\ ParenStack[TopOfParenStack].nids = nids_val;\ + ParenStack[TopOfParenStack].pfnum = *pfnum;\ ParenStack[TopOfParenStack].comm_id = comm_val;} ! #else ! #define PARENSTK_PUSH( paren_val, comm_val, nids_val ) {\ ! if( ++TopOfParenStack == SizeOfParenStack ) {\ ! SizeOfParenStack *= 2;\ ! dmm_realloc_size(sizeof(paren_stack));\ ! if( dmm_realloc( (void **) &ParenStack, (long)SizeOfParenStack )) {\ ! COMERR_SET( ERR_MEMORY );\ ! goto error_return;}}\ ! ParenStack[TopOfParenStack].paren_type = paren_val;\ ! ParenStack[TopOfParenStack].narg = 0;\ ! ParenStack[TopOfParenStack].nkey = 0;\ ! ParenStack[TopOfParenStack].nids = nids_val;\ ! ParenStack[TopOfParenStack].comm_id = comm_val;} ! #endif /* Operator stack macros */ #define INITIAL_OPER_STACK_SIZE 32 #define OPERSTK_PUSH( oper_id, type_val ) {\ *************** *** 217,222 **** --- 232,242 ---- static int braces_symid = -1; static int angbracks_symid = -1; static int dblangbracks_symid = -1; + static int parensplus_symid = -1; + static int bracketsplus_symid = -1; + static int bracesplus_symid = -1; + static int angbracksplus_symid = -1; + static int dblangbracksplus_symid = -1; /* === Static functions ================================================== */ *************** *** 1170,1187 **** } else { if (parens_symid==-1) { parens_symid = symbol_add("()"); brackets_symid = symbol_add("[]"); braces_symid = symbol_add("{}"); angbracks_symid = symbol_add("<>"); dblangbracks_symid = symbol_add("<<>>"); } int commandid = ParenStack[TopOfParenStack].comm_id; if (commandid<0) { ! if (toktype==TOK_RPAREN) commandid = parens_symid; ! else if (toktype==TOK_RBRACKET) commandid = brackets_symid; ! else if (toktype==TOK_RBRACE) commandid = braces_symid; ! else if (toktype==TOK_RANGBRACK) commandid = angbracks_symid; ! else commandid = dblangbracks_symid; } PFOUT( TOK_COMMAND, commandid, --- 1190,1228 ---- } else { if (parens_symid==-1) { parens_symid = symbol_add("()"); + parensplus_symid = symbol_add("+()"); brackets_symid = symbol_add("[]"); + bracketsplus_symid = symbol_add("+[]"); braces_symid = symbol_add("{}"); + bracesplus_symid = symbol_add("+{}"); angbracks_symid = symbol_add("<>"); + angbracksplus_symid = symbol_add("+<>"); dblangbracks_symid = symbol_add("<<>>"); + dblangbracksplus_symid = symbol_add("+<<>>"); } int commandid = ParenStack[TopOfParenStack].comm_id; if (commandid<0) { ! #ifdef PAREN_STACK_EXPERIMENT ! if (ParenStack[TopOfParenStack].pfnum==0 || TopOfParenStack>0 && ParenStack[TopOfParenStack-1].narg==0) { ! #else ! if (*pfnum==0 || TopOfParenStack>0 && ParenStack[TopOfParenStack-1].narg==0) { ! #endif ! if (toktype==TOK_RPAREN) commandid = parens_symid; ! else if (toktype==TOK_RBRACKET) commandid = brackets_symid; ! else if (toktype==TOK_RBRACE) commandid = braces_symid; ! else if (toktype==TOK_RANGBRACK) commandid = angbracks_symid; ! else commandid = dblangbracks_symid; ! } else { ! ParenStack[TopOfParenStack].narg++; // assume associated symbol (or stream) will be on stack ! #ifdef PAREN_STACK_EXPERIMENT ! if (TopOfParenStack>0) ParenStack[TopOfParenStack-1].narg--; ! #endif ! if (toktype==TOK_RPAREN) commandid = parensplus_symid; ! else if (toktype==TOK_RBRACKET) commandid = bracketsplus_symid; ! else if (toktype==TOK_RBRACE) commandid = bracesplus_symid; ! else if (toktype==TOK_RANGBRACK) commandid = angbracksplus_symid; ! else commandid = dblangbracksplus_symid; ! } } PFOUT( TOK_COMMAND, commandid, Index: ComUtil/comterp.h diff -c ComUtil/comterp.h:1.2 ComUtil/comterp.h:1.3 *** ComUtil/comterp.h:1.2 Sat Nov 8 10:10:47 2008 --- src/ComUtil/comterp.h Fri Feb 27 07:00:03 2009 *************** *** 142,147 **** --- 142,149 ---- int nids; /* Number of ids in compound command name */ } postfix_token; + #define PAREN_STACK_EXPERIMENT + /* Structure of stack to count command arguments and keywords */ typedef struct _paren_stack paren_stack; struct _paren_stack *************** *** 151,156 **** --- 153,161 ---- unsigned nkey; unsigned paren_type; int comm_id; + #ifdef PAREN_STACK_EXPERIMENT + int pfnum; // to keep track of postfix output prior this paren pushed on stack + #endif }; /* Structure of stack to store operators and keywords */ Index: man1_ivtools/comterp.1 diff -c man1_ivtools/comterp.1:1.4 man1_ivtools/comterp.1:1.5 *** man1_ivtools/comterp.1:1.4 Sat Nov 8 10:10:57 2008 --- src/man/man1/comterp.1 Fri Feb 27 07:00:11 2009 *************** *** 288,293 **** --- 288,297 ---- sym|lst=class(val [val ...]) -- return class symbol(s) for value(s) of object type + int=ctoi(char) -- convert character to integer + + flag=isspace(char) -- return true if character is whitespace + .SH ONLY IN SERVER MODE str=timeexpr(comstr :sec n) -- command string to execute at intervals Index: top_ivtools/MANIFEST diff -c top_ivtools/MANIFEST:1.3 top_ivtools/MANIFEST:1.4 *** top_ivtools/MANIFEST:1.3 Tue Dec 4 11:44:46 2007 --- ./MANIFEST Fri Feb 27 07:00:02 2009 *************** *** 155,160 **** --- 155,162 ---- ivtools-1.2/src/ComTerp/boolfunc.h ivtools-1.2/src/ComTerp/bquotefunc.c ivtools-1.2/src/ComTerp/bquotefunc.h + ivtools-1.2/src/ComTerp/charfunc.c + ivtools-1.2/src/ComTerp/charfunc.h ivtools-1.2/src/ComTerp/comfunc.c ivtools-1.2/src/ComTerp/comfunc.h ivtools-1.2/src/ComTerp/comhandler.c Index: top_ivtools/MANIFEST.comterp diff -c top_ivtools/MANIFEST.comterp:1.1 top_ivtools/MANIFEST.comterp:1.2 *** top_ivtools/MANIFEST.comterp:1.1 Wed Aug 29 10:37:43 2007 --- ./MANIFEST.comterp Fri Feb 27 07:00:02 2009 *************** *** 107,112 **** --- 107,114 ---- src/ComTerp/boolfunc.h src/ComTerp/bquotefunc.c src/ComTerp/bquotefunc.h + src/ComTerp/charfunc.c + src/ComTerp/charfunc.h src/ComTerp/comfunc.c src/ComTerp/comfunc.h src/ComTerp/comhandler.c Index: top_ivtools/MANIFEST.perceps diff -c top_ivtools/MANIFEST.perceps:1.2 top_ivtools/MANIFEST.perceps:1.3 *** top_ivtools/MANIFEST.perceps:1.2 Tue Dec 4 11:44:46 2007 --- ./MANIFEST.perceps Fri Feb 27 07:00:02 2009 *************** *** 22,27 **** --- 22,29 ---- ComTerp/bitfunc.h ComTerp/boolfunc.h ComTerp/bquotefunc.h + ComTerp/charfunc.c + ComTerp/charfunc.h ComTerp/comfunc.h ComTerp/comhandler.h ComTerp/commodule.h *** /dev/null Fri Feb 27 07:00:13 PST 2009 --- patches/ivtools-090227-johnston-024 *************** patches/ivtools-090227-johnston-024 *** 0 **** --- 1 ---- + ivtools-090227-johnston-024 --Apple-Mail-40-56714919 Content-Disposition: attachment; filename=ivtools-081108-johnston-023 Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-081108-johnston-023" Content-Transfer-Encoding: 7bit Patch: ivtools-081108-johnston-023 For: ivtools-1.2 Author: [email protected] Subject: added "<<" and ">>" delimeters for use of ipl, plus DYNAMIC_COMMANDS and STREAMS_FOR_IPL experiments Requires: This is an intermediate patch to ivtools-1.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.12 ComTerp/comterp.c:1.13 *** ComTerp/comterp.c:1.12 Sat Oct 25 10:24:59 2008 --- src/ComTerp/comterp.c Sat Nov 8 10:10:48 2008 *************** *** 164,169 **** --- 164,170 ---- _stepflag = 0; _echo_postfix = 0; _delim_func = 0; + _autostream = 0; _running = 0; _muted = 0; } *************** *** 220,225 **** --- 221,228 ---- return FUNCOK; } + boolean ComTerp::top_expr() { return _pfoff >= _pfnum; } + int ComTerp::eval_expr(ComValue* pfvals, int npfvals) { #if 0 int save_pfoff = _pfoff; *************** *** 260,265 **** --- 263,269 ---- /* create another StreamType ComValue to hold all its */ /* arguments, along with a pointer to the func. */ boolean has_streams = false; + int streamid = -1; if (!((ComFunc*)sv.obj_val())->post_eval()) for(int i=0; i<sv.narg()+sv.nkey(); i++) { if (!stack_top(-i).is_symbol() && !stack_top(-i).is_attribute()) *************** *** 269,280 **** lookup_symval(&stack_top(-i)); has_streams = testval ? testval->is_stream() : false; } ! if (has_streams) break; } if (has_streams) { AttributeValueList* avl = new AttributeValueList(); for(int i=0; i<sv.narg()+sv.nkey(); i++) { ComValue topval(pop_stack(true)); avl->Prepend(new AttributeValue(topval)); } ComValue val(sv.obj_val(), avl); --- 273,291 ---- lookup_symval(&stack_top(-i)); has_streams = testval ? testval->is_stream() : false; } ! if (has_streams) { ! streamid = i; ! break; ! } } if (has_streams) { AttributeValueList* avl = new AttributeValueList(); for(int i=0; i<sv.narg()+sv.nkey(); i++) { + #ifdef STREAMS_FOR_IPL + ComValue topval(pop_stack(i==streamid)); + #else ComValue topval(pop_stack(true)); + #endif avl->Prepend(new AttributeValue(topval)); } ComValue val(sv.obj_val(), avl); *************** *** 732,737 **** --- 743,752 ---- static int anglebrackets_symid = symbol_add("<>"); localtable()->find(vptr, anglebrackets_symid); } + else if (sv->nids() == TOK_RANGBRACK2) { + static int dblanglebrackets_symid = symbol_add("<<>>"); + localtable()->find(vptr, dblanglebrackets_symid); + } command_symid = sv->symbol_val(); } *************** *** 999,1006 **** status = -1; break; } else if (!func_for_next_expr() && val_for_next_func().is_null() && !muted()) { ! print_stack_top(out); ! out << "\n"; out.flush(); } } else { out << _errbuf << "\n"; out.flush(); --- 1014,1035 ---- status = -1; break; } else if (!func_for_next_expr() && val_for_next_func().is_null() && !muted()) { ! if (stack_top().is_stream() && autostream()) { ! ComValue streamv(stack_top()); ! NextFunc nextfunc(this); ! do { ! pop_stack(); ! push_stack(streamv); ! nextfunc.exec(1, 0); ! if (stack_top().is_known()) { ! print_stack_top(out); ! out << "\n"; out.flush(); ! } ! } while (stack_top().is_known()); ! } else { ! print_stack_top(out); ! out << "\n"; out.flush(); ! } } } else { out << _errbuf << "\n"; out.flush(); *************** *** 1555,1567 **** if (func->post_eval()) out << "*"; } else { char ldelim, rdelim; if (val.nids()==TOK_RPAREN) {ldelim = '('; rdelim = ')'; } else if (val.nids()==TOK_RBRACKET) {ldelim = '['; rdelim = ']'; } else if (val.nids()==TOK_RBRACE) {ldelim = '{'; rdelim = '}'; } else if (val.nids()==TOK_RANGBRACK) {ldelim = '<'; rdelim = '>'; } else {ldelim = ':'; rdelim = 0x0;}; ! out << ldelim << val.narg(); ! if (rdelim) out << rdelim; } } else if (val.is_type(AttributeValue::SymbolType) && --- 1584,1603 ---- if (func->post_eval()) out << "*"; } else { char ldelim, rdelim; + boolean dbldelim = 0; if (val.nids()==TOK_RPAREN) {ldelim = '('; rdelim = ')'; } else if (val.nids()==TOK_RBRACKET) {ldelim = '['; rdelim = ']'; } else if (val.nids()==TOK_RBRACE) {ldelim = '{'; rdelim = '}'; } else if (val.nids()==TOK_RANGBRACK) {ldelim = '<'; rdelim = '>'; } + else if (val.nids()==TOK_RANGBRACK2) {ldelim = '<'; rdelim = '>'; dbldelim=1;} else {ldelim = ':'; rdelim = 0x0;}; ! out << ldelim; ! if (dbldelim) out << ldelim; ! out << val.narg(); ! if (rdelim) { ! out << rdelim; ! if (dbldelim) out << rdelim; ! } } } else if (val.is_type(AttributeValue::SymbolType) && Index: ComTerp/comterp.h diff -c ComTerp/comterp.h:1.4 ComTerp/comterp.h:1.5 *** ComTerp/comterp.h:1.4 Tue May 6 10:55:04 2008 --- src/ComTerp/comterp.h Sat Nov 8 10:10:48 2008 *************** *** 91,96 **** --- 91,98 ---- // 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. + boolean top_expr(); + // return true if the topmost expression is currently being evaluated int print_stack_top() const; // print the top of the stack to stdout. *************** *** 259,264 **** --- 261,272 ---- boolean delim_func() const { return _delim_func; } // return flag that indicates whether to run a delimeter selected func. + void autostream(boolean flag) { _autostream = flag; } + // set flag that indicates whether to run a delimeter selected func. + + boolean autostream() const { return _autostream; } + // return flag that indicates whether to run a delimeter selected func. + void running(boolean flag) { _running = flag; } // set flag that indicates whether to run a delimeter selected func. *************** *** 347,352 **** --- 355,363 ---- boolean _delim_func; // use delimeter selected func, passing symbol in ::command_symid() + boolean _autostream; + // automatically iterates over stream if left on stack + boolean _running; // flag to inform others this ComTerp in use *************** *** 398,401 **** --- 409,414 ---- void* _inptr; }; + + //#define STREAMS_FOR_IPL #endif /* !defined(_comterp_h) */ Index: ComTerp/numfunc.c diff -c ComTerp/numfunc.c:1.2 ComTerp/numfunc.c:1.3 *** ComTerp/numfunc.c:1.2 Sun Sep 23 09:11:27 2007 --- src/ComTerp/numfunc.c Sat Nov 8 10:10:48 2008 *************** *** 192,197 **** --- 192,201 ---- } switch (result.type()) { + case ComValue::BooleanType: + result.int_ref() = operand1.int_val() + operand2.int_val(); + result.type(ComValue::IntType); + break; case ComValue::CharType: result.char_ref() = operand1.char_val() + operand2.char_val(); break; Index: ComTerp/postfunc.c diff -c ComTerp/postfunc.c:1.1 ComTerp/postfunc.c:1.2 *** ComTerp/postfunc.c:1.1 Wed Aug 29 10:37:48 2007 --- src/ComTerp/postfunc.c Sat Nov 8 10:10:48 2008 *************** *** 81,93 **** if (func->post_eval()) out << "*"; } else { char ldelim, rdelim; if (val.nids()==TOK_RPAREN) {ldelim = '('; rdelim = ')'; } else if (val.nids()==TOK_RBRACKET) {ldelim = '['; rdelim = ']'; } else if (val.nids()==TOK_RBRACE) {ldelim = '{'; rdelim = '}'; } else if (val.nids()==TOK_RANGBRACK) {ldelim = '<'; rdelim = '>'; } else {ldelim = ':'; rdelim = 0x0;}; ! out << ldelim << val.narg(); ! if (rdelim) out << rdelim; } } else if (val.is_type(AttributeValue::SymbolType) && --- 81,100 ---- if (func->post_eval()) out << "*"; } else { char ldelim, rdelim; + boolean dbldelim = 0; if (val.nids()==TOK_RPAREN) {ldelim = '('; rdelim = ')'; } else if (val.nids()==TOK_RBRACKET) {ldelim = '['; rdelim = ']'; } else if (val.nids()==TOK_RBRACE) {ldelim = '{'; rdelim = '}'; } else if (val.nids()==TOK_RANGBRACK) {ldelim = '<'; rdelim = '>'; } + else if (val.nids()==TOK_RANGBRACK2) {ldelim = '<'; rdelim = '>'; dbldelim=1;} else {ldelim = ':'; rdelim = 0x0;}; ! out << ldelim; ! if(dbldelim) out << ldelim; ! out << val.narg(); ! if (rdelim) { ! out << rdelim; ! if(dbldelim) out << rdelim; ! } } } else if (val.is_type(AttributeValue::SymbolType) && Index: ComTerp/strmfunc.c diff -c ComTerp/strmfunc.c:1.1 ComTerp/strmfunc.c:1.2 *** ComTerp/strmfunc.c:1.1 Wed Aug 29 10:37:49 2007 --- src/ComTerp/strmfunc.c Sat Nov 8 10:10:48 2008 *************** *** 343,349 **** --- 343,353 ---- } void NextFunc::execute() { + #ifdef STREAMS_FOR_IPL + ComValue streamv(stack_arg(0)); + #else ComValue streamv(stack_arg_post_eval(0)); + #endif reset_stack(); execute_impl(comterp(), streamv); Index: ComTerp/symbolfunc.c diff -c ComTerp/symbolfunc.c:1.2 ComTerp/symbolfunc.c:1.3 *** ComTerp/symbolfunc.c:1.2 Wed Oct 1 07:22:54 2008 --- src/ComTerp/symbolfunc.c Sat Nov 8 10:10:48 2008 *************** *** 103,109 **** AttributeValueList* avl = new AttributeValueList(); ComValue retval(avl); for (int i=0; i<numargs; i++) { ! AttributeValue* av = new AttributeValue(symbol_ids[i], AttributeValue::SymbolType); if (symbol_ids[i]<0) av->type(ComValue::UnknownType); avl->Append(av); } --- 103,110 ---- AttributeValueList* avl = new AttributeValueList(); ComValue retval(avl); for (int i=0; i<numargs; i++) { ! ComValue* av = new ComValue(symbol_ids[i], AttributeValue::SymbolType); ! av->bquote(1); if (symbol_ids[i]<0) av->type(ComValue::UnknownType); avl->Append(av); } *************** *** 111,116 **** --- 112,118 ---- } else { ComValue retval (symbol_ids[0], AttributeValue::SymbolType); if (symbol_ids[0]<0) retval.type(ComValue::UnknownType); + retval.bquote(1); push_stack(retval); } *************** *** 139,149 **** 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); } --- 141,155 ---- if (numargs>1) { AttributeValueList* avl = new AttributeValueList(); ComValue retval(avl); ! for (int i=0; i<numargs; i++) { ! ComValue* av = new ComValue(symbol_ids[i], AttributeValue::SymbolType); ! av->bquote(1); ! avl->Append(av); ! } push_stack(retval); } else { ComValue retval (symbol_ids[0], AttributeValue::SymbolType); + retval.bquote(1); push_stack(retval); } *************** *** 184,189 **** --- 190,208 ---- /*****************************************************************************/ + SymStrFunc::SymStrFunc(ComTerp* comterp) : ComFunc(comterp) { + } + + void SymStrFunc::execute() { + ComValue symv(stack_arg(0)); // will only show up here if backquoted + reset_stack(); + symv.type(ComValue::StringType); + push_stack(symv); + } + + + /*****************************************************************************/ + SplitStrFunc::SplitStrFunc(ComTerp* comterp) : ComFunc(comterp) { } *************** *** 261,269 **** AttributeValueList* avl = new AttributeValueList(); ComValue retval(avl); for (int i=0; i<numargs; i++) { ! AttributeValue* av = ! new AttributeValue(symbol_ids[i], AttributeValue::SymbolType); av->global_flag(true); avl->Append(av); } push_stack(retval); --- 280,289 ---- AttributeValueList* avl = new AttributeValueList(); ComValue retval(avl); for (int i=0; i<numargs; i++) { ! ComValue* av = ! new ComValue(symbol_ids[i], AttributeValue::SymbolType); av->global_flag(true); + av->bquote(1); avl->Append(av); } push_stack(retval); *************** *** 271,276 **** --- 291,297 ---- ComValue retval (symbol_ids[0], AttributeValue::SymbolType); retval.global_flag(true); + retval.bquote(1); push_stack(retval); } Index: ComTerp/symbolfunc.h diff -c ComTerp/symbolfunc.h:1.2 ComTerp/symbolfunc.h:1.3 *** ComTerp/symbolfunc.h:1.2 Wed Oct 1 07:22:54 2008 --- src/ComTerp/symbolfunc.h Sat Nov 8 10:10:48 2008 *************** *** 68,73 **** --- 68,84 ---- return "val|lst=%s(symbol_var [symbol_var ...]) -- return value(s) associated with symbol variables(s)"; } }; + //: return string version of symbol + // str=symstr(sym) -- return string version of symbol + class SymStrFunc : public ComFunc { + public: + SymStrFunc(ComTerp*); + virtual void execute(); + + virtual const char* docstring() { + return "str=%s(sym) -- return string version of symbol"; } + }; + //: create symbol command for ComTerp. // sym|lst=symadd(syml|str [sym|str ...]) -- create symbol(s) and return without lookup class SymAddFunc : public ComFunc { Index: ComTerp/typefunc.c diff -c ComTerp/typefunc.c:1.2 ComTerp/typefunc.c:1.3 *** ComTerp/typefunc.c:1.2 Mon Sep 15 16:43:02 2008 --- src/ComTerp/typefunc.c Sat Nov 8 10:10:48 2008 *************** *** 58,71 **** for (int i=0; i<numargs; i++) if (type_syms[i]<0) avl->Append(new AttributeValue()); ! else ! avl->Append(new AttributeValue(type_syms[i], AttributeValue::SymbolType)); push_stack(retval); } else { if (type_syms[0]<0) push_stack(ComValue::nullval()); else { ComValue retval (type_syms[0], AttributeValue::SymbolType); push_stack(retval); } } --- 58,75 ---- for (int i=0; i<numargs; i++) if (type_syms[i]<0) avl->Append(new AttributeValue()); ! else { ! ComValue* av = new ComValue(type_syms[i], AttributeValue::SymbolType); ! av->bquote(1); ! avl->Append(av); ! } push_stack(retval); } else { if (type_syms[0]<0) push_stack(ComValue::nullval()); else { ComValue retval (type_syms[0], AttributeValue::SymbolType); + retval.bquote(1); push_stack(retval); } } *************** *** 98,111 **** for (int i=0; i<numargs; i++) if (class_syms[i]<0) avl->Append(new AttributeValue()); ! else ! avl->Append(new AttributeValue(class_syms[i], AttributeValue::SymbolType)); push_stack(retval); } else { if (class_syms[0]<0) push_stack(ComValue::nullval()); else { ComValue retval (class_syms[0], AttributeValue::SymbolType); push_stack(retval); } } --- 102,119 ---- for (int i=0; i<numargs; i++) if (class_syms[i]<0) avl->Append(new AttributeValue()); ! else { ! ComValue* av = new ComValue(class_syms[i], AttributeValue::SymbolType); ! av->bquote(1); ! avl->Append(av); ! } push_stack(retval); } else { if (class_syms[0]<0) push_stack(ComValue::nullval()); else { ComValue retval (class_syms[0], AttributeValue::SymbolType); + retval.bquote(1); push_stack(retval); } } Index: comterp_/README diff -c comterp_/README:1.3 comterp_/README:1.4 *** comterp_/README:1.3 Wed Oct 1 07:22:55 2008 --- src/comterp_/README Sat Nov 8 10:10:49 2008 *************** *** 230,235 **** --- 230,237 ---- sym|lst=symadd(sym|str [sym|str ...]) -- create symbol(s) and return without lookup. + str=symstr(sym) -- return string version of symbol + lst=split(symbol|string) -- split symbol or string into list of characters. str=join(clist :sym) -- join list of characters into string Index: ComUtil/_parser.c diff -c ComUtil/_parser.c:1.3 ComUtil/_parser.c:1.4 *** ComUtil/_parser.c:1.3 Sat Oct 25 10:24:58 2008 --- src/ComUtil/_parser.c Sat Nov 8 10:10:47 2008 *************** *** 32,37 **** --- 32,38 ---- History: Written by Scott E. Johnston, April 1989 */ + // #define DYNAMIC_COMMANDS #include <stdio.h> #include <string.h> *************** *** 158,165 **** errid = ERR_UNEXPECTED_RBRACKET;\ else if( toktype == TOK_RBRACE )\ errid = ERR_UNEXPECTED_RBRACE;\ ! else\ errid = ERR_UNEXPECTED_RANGBRACK;\ COMERR_SET1( errid, *linenum );\ goto error_return;} --- 159,168 ---- errid = ERR_UNEXPECTED_RBRACKET;\ else if( toktype == TOK_RBRACE )\ errid = ERR_UNEXPECTED_RBRACE;\ ! else if( toktype == TOK_RANGBRACK )\ errid = ERR_UNEXPECTED_RANGBRACK;\ + else\ + errid = ERR_UNEXPECTED_RANGBRACK2;\ COMERR_SET1( errid, *linenum );\ goto error_return;} *************** *** 171,188 **** errid = ERR_UNEXPECTED_LBRACKET;\ else if( toktype == TOK_LBRACE )\ errid = ERR_UNEXPECTED_LBRACE;\ ! else\ errid = ERR_UNEXPECTED_LANGBRACK;\ COMERR_SET1( errid, *linenum );\ goto error_return;} #define INSTACK_PRIORITY_HIGHER( incoming_priority ) rkg_instack( incoming_priority) #define LEFT_PAREN( toktype ) \ ! (toktype == TOK_LPAREN || toktype == TOK_LBRACKET || toktype == TOK_LBRACE || toktype == TOK_LANGBRACK) #define RIGHT_PAREN( toktype ) \ ! (toktype == TOK_RPAREN || toktype == TOK_RBRACKET || toktype == TOK_RBRACE || toktype == TOK_RANGBRACK) #define PROCEEDING_WHITESPACE( tokstart ) \ (tokstart == 0 || isspace( buffer[tokstart-1] )) --- 174,193 ---- errid = ERR_UNEXPECTED_LBRACKET;\ else if( toktype == TOK_LBRACE )\ errid = ERR_UNEXPECTED_LBRACE;\ ! else if( toktype == TOK_LANGBRACK )\ errid = ERR_UNEXPECTED_LANGBRACK;\ + else\ + errid = ERR_UNEXPECTED_LANGBRACK2;\ COMERR_SET1( errid, *linenum );\ goto error_return;} #define INSTACK_PRIORITY_HIGHER( incoming_priority ) rkg_instack( incoming_priority) #define LEFT_PAREN( toktype ) \ ! (toktype == TOK_LPAREN || toktype == TOK_LBRACKET || toktype == TOK_LBRACE || toktype == TOK_LANGBRACK || toktype== TOK_LANGBRACK2) #define RIGHT_PAREN( toktype ) \ ! (toktype == TOK_RPAREN || toktype == TOK_RBRACKET || toktype == TOK_RBRACE || toktype == TOK_RANGBRACK || toktype == TOK_RANGBRACK2) #define PROCEEDING_WHITESPACE( tokstart ) \ (tokstart == 0 || isspace( buffer[tokstart-1] )) *************** *** 211,216 **** --- 216,222 ---- static int brackets_symid = -1; static int braces_symid = -1; static int angbracks_symid = -1; + static int dblangbracks_symid = -1; /* === Static functions ================================================== */ *************** *** 928,939 **** /* which will trigger the counting of narg and nkey to begin. */ if( LEFT_PAREN( NextToktype )) { ! PARENSTK_PUSH( NextToktype, *(int *)token, 1 ); ! OPERSTK_PUSH ( -NextToktype, LEFTPAREN ); ! *bufptr = NextBufptr; ! *linenum = NextLinenum; ! NextToklen = 0; ! expecting = OPTYPE_UNARY_PREFIX; } else { --- 934,978 ---- /* which will trigger the counting of narg and nkey to begin. */ if( LEFT_PAREN( NextToktype )) { ! ! ! #if defined(DYNAMIC_COMMANDS) ! ! if ( TopOfOperStack >=0 && INSTACK_PRIORITY_HIGHER(1000)) { ! ! /* Take all operators off the stack with priority higher than 1000 */ ! while ( TopOfOperStack >= 0 && ! INSTACK_PRIORITY_HIGHER(1000)) ! { ! expecting = OPTYPE_BINARY; ! PFOUT( TOK_COMMAND, *(int *)token, 0, 0, 1 ); ! ! if (OperStack[TopOfOperStack].oper_type == OPERATOR) ! { ! OPERSTK_POP( temp_id ); ! PFOUT( TOK_COMMAND, opr_tbl_commid( temp_id ), ! (opr_tbl_optype( temp_id ) == OPTYPE_BINARY ? 2 : 1), 0, 1 ); ! } ! else ! { ! OPERSTK_POP( temp_id ); ! PFOUT( TOK_KEYWORD, temp_id, 1, 0, 0); ! } ! } ! } else { ! #endif ! ! PARENSTK_PUSH( NextToktype, *(int *)token, 1 ); ! OPERSTK_PUSH ( -NextToktype, LEFTPAREN ); ! *bufptr = NextBufptr; ! *linenum = NextLinenum; ! NextToklen = 0; ! expecting = OPTYPE_UNARY_PREFIX; ! ! #if defined(DYNAMIC_COMMANDS) ! } ! #endif ! } else { *************** *** 1001,1011 **** --- 1040,1052 ---- /*-LBRACKET-LBRACKET-LBRACKET-LBRACKET-LBRACKET-LBRACKET-LBRACKET-LBRACKET-*/ /*-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-*/ /*-LANGBRACK-LANGBRACK-LANGBRACK-LANGBRACK-LANGBRACK-LANGBRACK-LANGBRACK-*/ + /*-LANGBRACK2-LANGBRACK2-LANGBRACK2-LANGBRACK2-LANGBRACK2-LANGBRACK2-LANGBRACK2-*/ case TOK_LPAREN: case TOK_LBRACKET: case TOK_LBRACE: case TOK_LANGBRACK: + case TOK_LANGBRACK2: /* Expecting a binary is either an error, or an indicator of */ /* separation between free format parameters */ *************** *** 1040,1050 **** --- 1081,1093 ---- /*-RBRACKET-RBRACKET-RBRACKET-RBRACKET-RBRACKET-RBRACKET-RBRACKET-RBRACKET-*/ /*-RBRACE-RBRACE-RBRACE-RBRACE-RBRACE-RBRACE-RBRACE-RBRACE-RBRACE-RBRACE-*/ /*-RANGBRACK-RANGBRACK-RANGBRACK-RANGBRACK-RANGBRACK-RANGBRACK-RANGBRACK-*/ + /*-RANGBRACK2-RANGBRACK2-RANGBRACK2-RANGBRACK2-RANGBRACK2-RANGBRACK2-RANGBRACK2-*/ case TOK_RPAREN: case TOK_RBRACKET: case TOK_RBRACE: case TOK_RANGBRACK: + case TOK_RANGBRACK2: /* Parenthesis integrity checking */ if( TopOfParenStack < 0 || *************** *** 1065,1071 **** ParenStack[TopOfParenStack].paren_type != TOK_LBRACE || toktype == TOK_RANGBRACK && ! ParenStack[TopOfParenStack].paren_type != TOK_LANGBRACK ) { UNEXPECTED_RPAREN_ERROR(toktype); } --- 1108,1117 ---- ParenStack[TopOfParenStack].paren_type != TOK_LBRACE || toktype == TOK_RANGBRACK && ! ParenStack[TopOfParenStack].paren_type != TOK_LANGBRACK || ! ! toktype == TOK_RANGBRACK2 && ! ParenStack[TopOfParenStack].paren_type != TOK_LANGBRACK2 ) { UNEXPECTED_RPAREN_ERROR(toktype); } *************** *** 1127,1139 **** brackets_symid = symbol_add("[]"); braces_symid = symbol_add("{}"); angbracks_symid = symbol_add("<>"); } int commandid = ParenStack[TopOfParenStack].comm_id; if (commandid<0) { if (toktype==TOK_RPAREN) commandid = parens_symid; else if (toktype==TOK_RBRACKET) commandid = brackets_symid; else if (toktype==TOK_RBRACE) commandid = braces_symid; ! else commandid = angbracks_symid; } PFOUT( TOK_COMMAND, commandid, --- 1173,1187 ---- brackets_symid = symbol_add("[]"); braces_symid = symbol_add("{}"); angbracks_symid = symbol_add("<>"); + dblangbracks_symid = symbol_add("<<>>"); } int commandid = ParenStack[TopOfParenStack].comm_id; if (commandid<0) { if (toktype==TOK_RPAREN) commandid = parens_symid; else if (toktype==TOK_RBRACKET) commandid = brackets_symid; else if (toktype==TOK_RBRACE) commandid = braces_symid; ! else if (toktype==TOK_RANGBRACK) commandid = angbracks_symid; ! else commandid = dblangbracks_symid; } PFOUT( TOK_COMMAND, commandid, Index: ComUtil/_scanner.c diff -c ComUtil/_scanner.c:1.1 ComUtil/_scanner.c:1.2 *** ComUtil/_scanner.c:1.1 Wed Aug 29 10:37:45 2007 --- src/ComUtil/_scanner.c Sat Nov 8 10:10:47 2008 *************** *** 197,208 **** break; case '<' : ! if (_angle_brackets) *toktype = TOK_LANGBRACK; search_state = LOOK_DONE; break; case '>' : ! if (_angle_brackets) *toktype = TOK_RANGBRACK; search_state = LOOK_DONE; break; --- 197,222 ---- break; case '<' : ! if (_angle_brackets) { ! if (buffer[*bufptr]=='<') { ! (*bufptr)++; ! *toktype = TOK_LANGBRACK2; ! } ! else ! *toktype = TOK_LANGBRACK; ! } search_state = LOOK_DONE; break; case '>' : ! if (_angle_brackets) { ! if (buffer[*bufptr]=='>') { ! (*bufptr)++; ! *toktype = TOK_RANGBRACK2; ! } ! else ! *toktype = TOK_RANGBRACK; ! } search_state = LOOK_DONE; break; Index: ComUtil/comterp.err diff -c ComUtil/comterp.err:1.1 ComUtil/comterp.err:1.2 *** ComUtil/comterp.err:1.1 Wed Aug 29 10:37:45 2007 --- src/ComUtil/comterp.err Sat Nov 8 10:10:47 2008 *************** *** 148,153 **** --- 148,159 ---- #define ERR_UNEXPECTED_LANGBRACK 1313 /* "parser: (%d) Unexpected left angle bracket" */ + #define ERR_UNEXPECTED_RANGBRACK2 1314 + /* "parser: (%d) Unexpected double right angle bracket" */ + + #define ERR_UNEXPECTED_LANGBRACK2 1315 + /* "parser: (%d) Unexpected double left angle bracket" */ + #define ERR_TYPE_BADPARAMS 5201 /* "types: Bad parameters in function call" */ Index: ComUtil/comterp.h diff -c ComUtil/comterp.h:1.1 ComUtil/comterp.h:1.2 *** ComUtil/comterp.h:1.1 Wed Aug 29 10:37:45 2007 --- src/ComUtil/comterp.h Sat Nov 8 10:10:47 2008 *************** *** 45,56 **** #define TOK_RBRACE 21 /* Right brace */ #define TOK_LANGBRACK 22 /* left angle bracket (less than) */ #define TOK_RANGBRACK 23 /* right angle bracket (greater than) */ ! #define TOK_KEYWORD 24 /* Keyword for free format parameters */ /* Token types returned from OPTABLE.C */ ! #define TOK_COMMAND 25 /* Command name */ ! #define TOK_BLANK 26 /* generated by empty parens: () */ /* OPTABLE.C Constants */ --- 45,58 ---- #define TOK_RBRACE 21 /* Right brace */ #define TOK_LANGBRACK 22 /* left angle bracket (less than) */ #define TOK_RANGBRACK 23 /* right angle bracket (greater than) */ ! #define TOK_LANGBRACK2 24 /* left angle bracket (less than) */ ! #define TOK_RANGBRACK2 25 /* right angle bracket (greater than) */ ! #define TOK_KEYWORD 26 /* Keyword for free format parameters */ /* Token types returned from OPTABLE.C */ ! #define TOK_COMMAND 27 /* Command name */ ! #define TOK_BLANK 28 /* generated by empty parens: () */ /* OPTABLE.C Constants */ Index: GraphUnidraw/nodecomp.c diff -c GraphUnidraw/nodecomp.c:1.10 GraphUnidraw/nodecomp.c:1.11 *** GraphUnidraw/nodecomp.c:1.10 Thu Oct 9 07:18:52 2008 --- src/GraphUnidraw/nodecomp.c Sat Nov 8 10:10:54 2008 *************** *** 952,973 **** for (node->first(i); !node->done(i); node->next(i)) { TopoEdge* edge = node->edge(node->elem(i)); int x0, y0, x1, y1; ! if (edge->end_node() == node) { ((EdgeComp*)edge->value())->GetEdgeView(GetViewer())->GetArrowLine()-> ! GetOriginal(x0, y0, x1, y1); ! } ! else { ((EdgeComp*)edge->value())->GetEdgeView(GetViewer())->GetArrowLine()-> ! GetOriginal(x1, y1, x0, y0); ! } ! Transformer trans; ! ((EdgeComp*)edge->value())->GetEdgeView(GetViewer())->GetArrowLine()-> TotalTransformation(trans); ! trans.Transform(x0, y0); ! trans.Transform(x1, y1); ! RubberLine* rubline = new RubberLine(nil, nil, x0-(x1-e.x), y0-(y1-e.y), x1, y1, ! x1 - e.x, y1 - e.y); ! rubgroup->Append(rubline); } m = new DragManip( v, rubgroup, rel, tool, DragConstraint(HorizOrVert | Gravity) --- 952,975 ---- for (node->first(i); !node->done(i); node->next(i)) { TopoEdge* edge = node->edge(node->elem(i)); int x0, y0, x1, y1; ! if (((EdgeComp*)edge->value())->GetArrowLine()) { ! if (edge->end_node() == node) { ((EdgeComp*)edge->value())->GetEdgeView(GetViewer())->GetArrowLine()-> ! GetOriginal(x0, y0, x1, y1); ! } ! else { ((EdgeComp*)edge->value())->GetEdgeView(GetViewer())->GetArrowLine()-> ! GetOriginal(x1, y1, x0, y0); ! } ! Transformer trans; ! ((EdgeComp*)edge->value())->GetEdgeView(GetViewer())->GetArrowLine()-> TotalTransformation(trans); ! trans.Transform(x0, y0); ! trans.Transform(x1, y1); ! RubberLine* rubline = new RubberLine(nil, nil, x0-(x1-e.x), y0-(y1-e.y), x1, y1, ! x1 - e.x, y1 - e.y); ! rubgroup->Append(rubline); ! } } m = new DragManip( v, rubgroup, rel, tool, DragConstraint(HorizOrVert | Gravity) Index: man1_ivtools/comterp.1 diff -c man1_ivtools/comterp.1:1.3 man1_ivtools/comterp.1:1.4 *** man1_ivtools/comterp.1:1.3 Wed Oct 1 07:23:02 2008 --- src/man/man1/comterp.1 Sat Nov 8 10:10:57 2008 *************** *** 236,241 **** --- 236,243 ---- sym|lst=symadd(sym|str [sym|str ...]) -- create symbol(s) and return without lookup. + str=symstr(sym) -- return string version of symbol + lst=split(symbol|string) -- split symbol or string into list of characters. str=join(clist :sym) -- join list of characters into string Index: OverlayUnidraw/ovcomps.c diff -c OverlayUnidraw/ovcomps.c:1.4 OverlayUnidraw/ovcomps.c:1.5 *** OverlayUnidraw/ovcomps.c:1.4 Fri May 16 10:47:55 2008 --- src/OverlayUnidraw/ovcomps.c Sat Nov 8 10:10:53 2008 *************** *** 949,954 **** --- 949,965 ---- OverlayComp* OverlaysComp::Comp (UList* r) { return (OverlayComp*) (*r)(); } GraphicComp* OverlaysComp::GetComp (Iterator i) { return Comp(Elem(i)); } + int OverlaysComp::Count() { + Iterator it; + int i=0; + First(it); + while (!Done(it)) { + i++; + Next(it); + } + return i; + } + void OverlaysComp::SetComp (GraphicComp* gc, Iterator& i) { i.SetValue(_comps->Find(gc)); } Index: OverlayUnidraw/ovcomps.h diff -c OverlayUnidraw/ovcomps.h:1.3 OverlayUnidraw/ovcomps.h:1.4 *** OverlayUnidraw/ovcomps.h:1.3 Wed Nov 7 07:55:12 2007 --- src/OverlayUnidraw/ovcomps.h Sat Nov 8 10:10:53 2008 *************** *** 227,232 **** --- 227,234 ---- // move Iterator to the previous element in the list. virtual boolean Done(Iterator); // test Iterator to see if off the end of the list. + virtual int Count(); + // return number of elements virtual GraphicComp* GetComp(Iterator); // return pointer to component within the current element of the list *** /dev/null Sat Nov 8 10:10:58 PST 2008 --- patches/ivtools-081108-johnston-023 *************** patches/ivtools-081108-johnston-023 *** 0 **** --- 1 ---- + ivtools-081108-johnston-023 --Apple-Mail-40-56714919 Content-Disposition: attachment; filename=ivtools-081025-johnston-022 Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-081025-johnston-022" Content-Transfer-Encoding: 7bit Patch: ivtools-081025-johnston-022 For: ivtools-1.2 Author: [email protected] Subject: getting ready for 1.2.7, and ported to Ubuntu Heron Requires: This is an intermediate patch to ivtools-1.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: Index: comdraw/README diff -c comdraw/README:1.1 comdraw/README:1.2 *** comdraw/README:1.1 Wed Aug 29 10:38:55 2007 --- src/comdraw/README Sat Oct 25 10:25:08 2008 *************** *** 64,70 **** DIRECT MANIPULATION COMMANDS ! select([compview ...] :all :clear) -- make these graphics the current selection delete(compview [compview ...]) -- delete graphic(s) move(dx dy) -- move current selection scale(xflt yflt) -- scale current selection --- 64,70 ---- DIRECT MANIPULATION COMMANDS ! select([compview ... | compview,compview[,... compview]] :all :clear) -- make these graphics the current selection delete(compview [compview ...]) -- delete graphic(s) move(dx dy) -- move current selection scale(xflt yflt) -- scale current selection Index: ComTerp/boolfunc.c diff -c ComTerp/boolfunc.c:1.4 ComTerp/boolfunc.c:1.5 *** ComTerp/boolfunc.c:1.4 Thu Oct 9 07:18:45 2008 --- src/ComTerp/boolfunc.c Sat Oct 25 10:24:59 2008 *************** *** 268,275 **** result.boolean_ref() = operand2.type() == ComValue::ObjectType && operand1.class_symid() == operand2.class_symid() && operand2.object_compview() && ! ((GraphicView*)operand1.obj_val())->GetGraphicComp() == ! ((GraphicView*)operand2.obj_val())->GetGraphicComp(); break; default: result.boolean_ref() = --- 268,275 ---- result.boolean_ref() = operand2.type() == ComValue::ObjectType && operand1.class_symid() == operand2.class_symid() && operand2.object_compview() && ! ((ComponentView*)operand1.obj_val())->GetSubject() == ! ((ComponentView*)operand2.obj_val())->GetSubject(); break; default: result.boolean_ref() = *************** *** 356,363 **** result.boolean_ref() = operand2.type() != ComValue::ObjectType || operand1.class_symid() != operand2.class_symid() || !operand2.object_compview() || ! ((GraphicView*)operand1.obj_val())->GetGraphicComp() != ! ((GraphicView*)operand2.obj_val())->GetGraphicComp(); break; case ComValue::UnknownType: result.boolean_ref() = operand2.is_known(); --- 356,363 ---- result.boolean_ref() = operand2.type() != ComValue::ObjectType || operand1.class_symid() != operand2.class_symid() || !operand2.object_compview() || ! ((ComponentView*)operand1.obj_val())->GetSubject() != ! ((ComponentView*)operand2.obj_val())->GetSubject(); break; case ComValue::UnknownType: result.boolean_ref() = operand2.is_known(); Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.11 ComTerp/comterp.c:1.12 *** ComTerp/comterp.c:1.11 Thu Oct 9 07:18:45 2008 --- src/ComTerp/comterp.c Sat Oct 25 10:24:59 2008 *************** *** 715,721 **** localtable()->find(vptr, command_symid); /* handle case where symbol has matched parens, and things are set up to invoke a delim-specific func. */ ! if (!vptr && _delim_func && sv->nids() != 1) { if (sv->nids() == TOK_RPAREN) { static int parens_symid = symbol_add("()"); localtable()->find(vptr, parens_symid); --- 715,721 ---- localtable()->find(vptr, command_symid); /* handle case where symbol has matched parens, and things are set up to invoke a delim-specific func. */ ! if (/*!vptr && */ _delim_func && sv->nids() != 1) { if (sv->nids() == TOK_RPAREN) { static int parens_symid = symbol_add("()"); localtable()->find(vptr, parens_symid); Index: ComTerp/comvalue.c diff -c ComTerp/comvalue.c:1.3 ComTerp/comvalue.c:1.4 *** ComTerp/comvalue.c:1.3 Mon Sep 15 16:43:02 2008 --- src/ComTerp/comvalue.c Sat Oct 25 10:24:59 2008 *************** *** 389,395 **** void* ComValue::geta(int id) { if (is_object(id)) { if (object_compview()) ! return ((GraphicView*)obj_val())->GetGraphicComp(); else return obj_val(); } else --- 389,395 ---- void* ComValue::geta(int id) { if (is_object(id)) { if (object_compview()) ! return ((ComponentView*)obj_val())->GetSubject(); else return obj_val(); } else Index: comterp_/main.c diff -c comterp_/main.c:1.1 comterp_/main.c:1.2 *** comterp_/main.c:1.1 Wed Aug 29 10:37:51 2007 --- src/comterp_/main.c Sat Oct 25 10:25:00 2008 *************** *** 60,65 **** --- 60,68 ---- static char newline; #endif + using std::cout; + using std::cerr; + int main(int argc, char *argv[]) { boolean server_flag = argc>1 && strcmp(argv[1], "server") == 0; Index: ComUnidraw/grfunc.c diff -c ComUnidraw/grfunc.c:1.5 ComUnidraw/grfunc.c:1.6 *** ComUnidraw/grfunc.c:1.5 Fri May 16 10:47:58 2008 --- src/ComUnidraw/grfunc.c Sat Oct 25 10:25:07 2008 *************** *** 999,1004 **** --- 999,1021 ---- compval->object_compview(true); avl->Append(compval); } + } else if (obj.is_array()) { + Iterator it; + AttributeValueList* al = obj.array_val(); + al->First(it); + while (!al->Done(it)) { + if (al->GetAttrVal(it)->object_compview()) { + ComponentView* comview = (ComponentView*)al->GetAttrVal(it)->obj_val(); + OverlayComp* comp = (OverlayComp*)comview->GetSubject(); + if (comp) { + newSel->Append(comp->FindView(viewer)); + ComValue* compval = new ComValue(comp->classid(), new OverlayView(comp)); + compval->object_compview(true); + avl->Append(compval); + } + } + al->Next(it); + } } } } Index: ComUnidraw/grfunc.h diff -c ComUnidraw/grfunc.h:1.2 ComUnidraw/grfunc.h:1.3 *** ComUnidraw/grfunc.h:1.2 Thu Nov 15 14:18:09 2007 --- src/ComUnidraw/grfunc.h Sat Oct 25 10:25:07 2008 *************** *** 200,206 **** SelectFunc(ComTerp*,Editor*); virtual void execute(); virtual const char* docstring() { ! return "%s([compview ...] :all :clear) -- make these graphics the current selection (dflt is current)"; } }; //: command to delete graphics in comdraw. --- 200,206 ---- SelectFunc(ComTerp*,Editor*); virtual void execute(); virtual const char* docstring() { ! return "%s([compview ... | compview,compview[,... compview]] :all :clear) -- make these graphics the current selection (dflt is current)"; } }; //: command to delete graphics in comdraw. Index: ComUtil/_parser.c diff -c ComUtil/_parser.c:1.2 ComUtil/_parser.c:1.3 *** ComUtil/_parser.c:1.2 Sun Sep 23 09:11:25 2007 --- src/ComUtil/_parser.c Sat Oct 25 10:24:58 2008 *************** *** 1205,1211 **** /* 4) If the next token is an operator, it is not a binary operator */ /* 5) If _sticky_matched_delims is true, and the next token is not an */ /* operator, then it can't be a matching delimeter. */ - /* and _delim_concatenation */ if( !done && TopOfParenStack < 0 && expecting == OPTYPE_BINARY ) { if( NextToklen == 0 ) --- 1205,1210 ---- Index: config_ivtools/params.def diff -c config_ivtools/params.def:1.3 config_ivtools/params.def:1.4 *** config_ivtools/params.def:1.3 Wed May 7 08:52:50 2008 --- config/params.def Sat Oct 25 10:25:13 2008 *************** *** 27,33 **** * Name of the software release */ #ifndef Release ! #define Release ivtools-1.2.6 #endif RELEASE = Release --- 27,33 ---- * Name of the software release */ #ifndef Release ! #define Release ivtools-1.2.7 #endif RELEASE = Release *************** *** 36,42 **** * VersionNumber */ #ifndef Version ! #define Version 1.2.6 #endif VERSION = Version --- 36,42 ---- * VersionNumber */ #ifndef Version ! #define Version 1.2.7 #endif VERSION = Version Index: DrawServ/ackback-handler.h diff -c DrawServ/ackback-handler.h:1.1 DrawServ/ackback-handler.h:1.2 *** DrawServ/ackback-handler.h:1.1 Wed Aug 29 10:39:00 2007 --- src/DrawServ/ackback-handler.h Sat Oct 25 10:25:09 2008 *************** *** 26,31 **** --- 26,32 ---- #ifndef _ackback_handler_ #define _ackback_handler_ + #include <iosfwd> #include <ace/Event_Handler.h> class DrawLink; Index: DrawServ/drawlink.c diff -c DrawServ/drawlink.c:1.1 DrawServ/drawlink.c:1.2 *** DrawServ/drawlink.c:1.1 Wed Aug 29 10:39:00 2007 --- src/DrawServ/drawlink.c Sat Oct 25 10:25:09 2008 *************** *** 33,38 **** --- 33,42 ---- #include <Unidraw/globals.h> #include <fstream.h> #include <unistd.h> + #include <iostream> + + using std::cout; + using std::cerr; int DrawLink::_linkcnt = 0; Index: DrawServ/drawserv.c diff -c DrawServ/drawserv.c:1.1 DrawServ/drawserv.c:1.2 *** DrawServ/drawserv.c:1.1 Wed Aug 29 10:39:00 2007 --- src/DrawServ/drawserv.c Sat Oct 25 10:25:09 2008 *************** *** 60,65 **** --- 60,69 ---- #include <fstream.h> #include <strstream> #include <unistd.h> + #include <iostream> + + using std::cout; + using std::cerr; #ifdef HAVE_ACE implementTable(GraphicIdTable,int,void*) Index: drawserv_/main.c diff -c drawserv_/main.c:1.2 drawserv_/main.c:1.3 *** drawserv_/main.c:1.2 Fri May 16 10:48:05 2008 --- src/drawserv_/main.c Sat Oct 25 10:25:10 2008 *************** *** 31,37 **** #include <DrawServ/drawserv-handler.h> #include <OverlayUnidraw/aceimport.h> #include <AceDispatch/ace_dispatcher.h> ! #include <Comterp/comhandler.h> #endif #include <DrawServ/drawcatalog.h> --- 31,37 ---- #include <DrawServ/drawserv-handler.h> #include <OverlayUnidraw/aceimport.h> #include <AceDispatch/ace_dispatcher.h> ! #include <ComTerp/comhandler.h> #endif #include <DrawServ/drawcatalog.h> Index: drawtool/main.c diff -c drawtool/main.c:1.2 drawtool/main.c:1.3 *** drawtool/main.c:1.2 Fri May 16 10:47:57 2008 --- src/drawtool/main.c Sat Oct 25 10:25:06 2008 *************** *** 32,38 **** #ifdef HAVE_ACE #include <OverlayUnidraw/aceimport.h> #include <AceDispatch/ace_dispatcher.h> ! #include <Comterp/comhandler.h> #endif #include <OverlayUnidraw/ovcatalog.h> --- 32,38 ---- #ifdef HAVE_ACE #include <OverlayUnidraw/aceimport.h> #include <AceDispatch/ace_dispatcher.h> ! #include <ComTerp/comhandler.h> #endif #include <OverlayUnidraw/ovcatalog.h> Index: include_std/signal.h diff -c include_std/signal.h:1.1 include_std/signal.h:1.2 *** include_std/signal.h:1.1 Wed Aug 29 10:39:19 2007 --- src/include/ivstd/signal.h Sat Oct 25 10:25:12 2008 *************** *** 3,8 **** --- 3,12 ---- #if defined(__cplusplus) + #if __linux + #undef __need_sig_atomic_t + #undef __need_sigset_t + #endif #include_next <signal.h> #undef NULL #define NULL 0 Index: include_std/version.h diff -c include_std/version.h:1.3 include_std/version.h:1.4 *** include_std/version.h:1.3 Wed May 7 08:52:48 2008 --- src/include/ivstd/version.h Sat Oct 25 10:25:12 2008 *************** *** 1,3 **** ! #define IvtoolsVersion 1.2.6 ! #define VersionString "1.2.6" ! #define ReleaseString "ivtools-1.2.6" --- 1,3 ---- ! #define IvtoolsVersion 1.2.7 ! #define VersionString "1.2.7" ! #define ReleaseString "ivtools-1.2.7" Index: OverlayUnidraw/aceimport.c diff -c OverlayUnidraw/aceimport.c:1.1 OverlayUnidraw/aceimport.c:1.2 *** OverlayUnidraw/aceimport.c:1.1 Wed Aug 29 10:38:49 2007 --- src/OverlayUnidraw/aceimport.c Sat Oct 25 10:25:05 2008 *************** *** 31,40 **** #include <IVGlyph/importchooser.h> #include <Unidraw/iterator.h> #include <Unidraw/unidraw.h> ! #include <Comterp/comhandler.h> #include <fstream.h> #include <stdio.h> /*****************************************************************************/ UnidrawImportHandler::UnidrawImportHandler () --- 31,44 ---- #include <IVGlyph/importchooser.h> #include <Unidraw/iterator.h> #include <Unidraw/unidraw.h> ! #include <ComTerp/comhandler.h> #include <fstream.h> #include <stdio.h> + #include <iostream> + using std::cout; + using std::cerr; + /*****************************************************************************/ UnidrawImportHandler::UnidrawImportHandler () Index: src_os/string.c diff -c src_os/string.c:1.3 src_os/string.c:1.4 *** src_os/string.c:1.3 Fri May 16 10:47:41 2008 --- src/OS/string.c Sat Oct 25 10:25:01 2008 *************** *** 465,471 **** char* strnew (const char* s) { ! char* dup = new char[strlen(s) + 1]; ! strcpy(dup, s); ! return dup; } --- 465,472 ---- char* strnew (const char* s) { ! if (!s) return nil; ! char* dup = new char[strlen(s) + 1]; ! strcpy(dup, s); ! return dup; } Index: top_ivtools/CHANGES diff -c top_ivtools/CHANGES:1.6 top_ivtools/CHANGES:1.7 *** top_ivtools/CHANGES:1.6 Wed Jul 9 11:43:32 2008 --- ./CHANGES Sat Oct 25 10:24:57 2008 *************** *** 1,3 **** --- 1,7 ---- + October 9th, 2008 ivtools-1.2.7 + + - balance of changes to support ipl-1.0.3 + July 9th, 2008 ivtools-1.2.6 - Debian contributed patch for iostreams backward compatibility Index: top_ivtools/Copyright diff -c top_ivtools/Copyright:1.4 top_ivtools/Copyright:1.6 *** top_ivtools/Copyright:1.4 Sun Sep 23 09:11:24 2007 --- ./Copyright Sat Oct 25 10:24:57 2008 *************** *** 1,5 **** /* ! * Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Scott E. Johnston * Copyright (c) 2000 Vectaport Inc., IET Inc * Copyright (c) 1999 Vectaport Inc., IET Inc, R.B. Kissh and Associates * Copyright (c) 1998 Vectaport Inc., R.B. Kissh and Associates, Eric F. Kahler --- 1,5 ---- /* ! * Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Scott E. Johnston * Copyright (c) 2000 Vectaport Inc., IET Inc * Copyright (c) 1999 Vectaport Inc., IET Inc, R.B. Kissh and Associates * Copyright (c) 1998 Vectaport Inc., R.B. Kissh and Associates, Eric F. Kahler Index: top_ivtools/INSTALL diff -c top_ivtools/INSTALL:1.5 top_ivtools/INSTALL:1.6 *** top_ivtools/INSTALL:1.5 Fri May 16 10:47:34 2008 --- ./INSTALL Sat Oct 25 10:24:57 2008 *************** *** 1,7 **** INSTALL for ivtools-1.2 ! Instructions for building ivtools-1.2.6 from source, the short version: ./configure make --- 1,7 ---- INSTALL for ivtools-1.2 ! Instructions for building ivtools-1.2.7 from source, the short version: ./configure make *************** *** 65,76 **** http://www.cs.wustl.edu/%7Eschmidt/ACE.html ! We are currently using ACE-5.1 (or the latest copy of ACE) built without threads support. Follow these steps to build it from source, or use the Debian binary if you happen to be working on that platform (libace5.1-dev): ! tar xvfz ACE-5.1.tar.gz cd ACE_wrappers export ACE_ROOT=`pwd` # csh: setenv ACE_ROOT `pwd` cd ace --- 65,76 ---- http://www.cs.wustl.edu/%7Eschmidt/ACE.html ! We are currently using ACE-5.6 (or the latest copy of ACE) built without threads support. Follow these steps to build it from source, or use the Debian binary if you happen to be working on that platform (libace5.1-dev): ! tar xvfz ACE-5.6.tar.gz cd ACE_wrappers export ACE_ROOT=`pwd` # csh: setenv ACE_ROOT `pwd` cd ace Index: top_ivtools/README diff -c top_ivtools/README:1.4 top_ivtools/README:1.5 *** top_ivtools/README:1.4 Fri May 16 10:47:34 2008 --- ./README Sat Oct 25 10:24:57 2008 *************** *** 2,8 **** README for ivtools 1.2 ! This directory contains a release of ivtools 1.2.6. You should read the rest of this file for information on what ivtools is and the INSTALL file for instructions on how to build it. --- 2,8 ---- README for ivtools 1.2 ! This directory contains a release of ivtools 1.2.7. You should read the rest of this file for information on what ivtools is and the INSTALL file for instructions on how to build it. *** /dev/null Sat Oct 25 10:25:14 PDT 2008 --- patches/ivtools-081025-johnston-022 *************** patches/ivtools-081025-johnston-022 *** 0 **** --- 1 ---- + ivtools-081025-johnston-022 --Apple-Mail-40-56714919 Content-Disposition: attachment; filename=ivtools-081009-johnston-021 Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-081009-johnston-021" Content-Transfer-Encoding: 7bit Patch: ivtools-081009-johnston-021 For: ivtools-1.2 Author: [email protected] Subject: miscellaneous ipl related fixes Requires: This is an intermediate patch to ivtools-1.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: Index: ComTerp/boolfunc.c diff -c ComTerp/boolfunc.c:1.3 ComTerp/boolfunc.c:1.4 *** ComTerp/boolfunc.c:1.3 Mon Sep 15 16:43:02 2008 --- src/ComTerp/boolfunc.c Thu Oct 9 07:18:45 2008 *************** *** 210,215 **** --- 210,218 ---- if (operand2.type()==ComValue::UnknownType && operand1.type()!=ComValue::UnknownType) result.boolean_ref() = 0; + else if (operand2.type()==ComValue::BlankType && operand1.type()!=ComValue::BlankType) + result.boolean_ref() = 0; + else { switch (operand1.type()) { case ComValue::CharType: *************** *** 269,276 **** ((GraphicView*)operand2.obj_val())->GetGraphicComp(); break; default: ! result.boolean_ref() = operand1.is_type(ComValue::UnknownType) && ! operand2.is_type(ComValue::UnknownType); break; } } --- 272,280 ---- ((GraphicView*)operand2.obj_val())->GetGraphicComp(); break; default: ! result.boolean_ref() = ! operand1.is_type(ComValue::UnknownType) && operand2.is_type(ComValue::UnknownType) || ! operand1.is_type(ComValue::BlankType) && operand2.is_type(ComValue::BlankType); break; } } Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.10 ComTerp/comterp.c:1.11 *** ComTerp/comterp.c:1.10 Mon Sep 15 16:43:02 2008 --- src/ComTerp/comterp.c Thu Oct 9 07:18:45 2008 *************** *** 1328,1333 **** --- 1328,1335 ---- for (int j=0; j<bufsiz; j++) newbuf[j] = buffer[j]; bufsiz *= 2; + delete buffer; + buffer = newbuf; } buffer[ncomm++] = key; } Index: FrameUnidraw/framekit.c diff -c FrameUnidraw/framekit.c:1.1 FrameUnidraw/framekit.c:1.2 *** FrameUnidraw/framekit.c:1.1 Wed Aug 29 10:38:56 2007 --- src/FrameUnidraw/framekit.c Thu Oct 9 07:18:51 2008 *************** *** 247,257 **** --- 247,261 ---- layout.vcenter( layout.margin( layout.vbox( + #if 0 wk.label("type help"), layout.vspace(10), wk.label("to print"), layout.vspace(10), wk.label("info to stdout") + #else + kit->appicon() + #endif ), 10 ) Index: GraphUnidraw/nodecomp.c diff -c GraphUnidraw/nodecomp.c:1.9 GraphUnidraw/nodecomp.c:1.10 *** GraphUnidraw/nodecomp.c:1.9 Fri May 16 10:48:02 2008 --- src/GraphUnidraw/nodecomp.c Thu Oct 9 07:18:52 2008 *************** *** 748,753 **** --- 748,793 ---- } + int NodeComp::EdgeInOrder(EdgeComp* edgecomp) const { + int order = 0; + if (edgecomp) { + TopoEdge* edge = edgecomp->Edge(); + TopoNode* toponode = Node(); + if (edge && edge->end_node()==toponode) { + Iterator it; + toponode->first(it); + while (!toponode->done(it)) { + TopoEdge* edge = toponode->get_edge(it); + if (edge ==toponode->get_edge(it)) + return order; + order++; + toponode->next(it); + } + } + } + return -1; + } + + int NodeComp::EdgeOutOrder(EdgeComp* edgecomp) const { + int order = 0; + if (edgecomp) { + TopoEdge* edge = edgecomp->Edge(); + TopoNode* toponode = Node(); + if (edge && edge->start_node()==toponode) { + Iterator it; + toponode->first(it); + while (!toponode->done(it)) { + TopoEdge* edge = toponode->get_edge(it); + if (edge ==toponode->get_edge(it)) + return order; + order++; + toponode->next(it); + } + } + } + return -1; + } + /*****************************************************************************/ NodeView::NodeView(NodeComp* comp) : OverlayView(comp) { Index: GraphUnidraw/nodecomp.h diff -c GraphUnidraw/nodecomp.h:1.5 GraphUnidraw/nodecomp.h:1.6 *** GraphUnidraw/nodecomp.h:1.5 Fri Oct 12 08:11:29 2007 --- src/GraphUnidraw/nodecomp.h Thu Oct 9 07:18:52 2008 *************** *** 146,151 **** --- 146,157 ---- EdgeComp* EdgeOut(int n) const; // return pointer to nth outgoing edge. + int EdgeInOrder(EdgeComp*) const; + // return order of incoming edge. + + int EdgeOutOrder(EdgeComp*) const; + // return order of outgoing edge. + void nedges (int &nin, int &nout) const; // count number of input and ouput edges *** /dev/null Thu Oct 9 07:18:55 PDT 2008 --- patches/ivtools-081009-johnston-021 *************** patches/ivtools-081009-johnston-021 *** 0 **** --- 1 ---- + ivtools-081009-johnston-021 --Apple-Mail-40-56714919 Content-Disposition: attachment; filename=ivtools-081001-johnston-020 Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-081001-johnston-020" Content-Transfer-Encoding: 7bit Patch: ivtools-081001-johnston-020 For: ivtools-1.2 Author: [email protected] Subject: a few changes to support ipl work Requires: This is an intermediate patch to ivtools-1.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: Index: Attribute/attrlist.c diff -c Attribute/attrlist.c:1.6 Attribute/attrlist.c:1.7 *** Attribute/attrlist.c:1.6 Fri May 16 10:47:36 2008 --- src/Attribute/attrlist.c Wed Oct 1 07:22:53 2008 *************** *** 445,451 **** --- 445,453 ---- out << attrval->boolean_ref(); break; case AttributeValue::ArrayType: + out << "{"; out << *attrval->array_ref(); + out << "}"; break; default: out << "nil"; Index: ComTerp/bquotefunc.c diff -c ComTerp/bquotefunc.c:1.1 ComTerp/bquotefunc.c:1.2 *** ComTerp/bquotefunc.c:1.1 Wed Aug 29 10:37:48 2007 --- src/ComTerp/bquotefunc.c Wed Oct 1 07:22:54 2008 *************** *** 34,41 **** --- 34,50 ---- } void BackQuoteFunc::execute() { + #if 0 // maybe, maybe not + ComValue topval(stack_arg(0, true)); + if (topval.is_command()) + topval.assignval(stack_arg_post_eval(0, true /* no symbol lookup */)); + reset_stack(); + topval.bquote(1); + push_stack(topval); + #else ComValue retval(stack_arg(0, true)); reset_stack(); retval.bquote(1); push_stack(retval); + #endif } Index: ComTerp/symbolfunc.c diff -c ComTerp/symbolfunc.c:1.1 ComTerp/symbolfunc.c:1.2 *** ComTerp/symbolfunc.c:1.1 Wed Aug 29 10:37:49 2007 --- src/ComTerp/symbolfunc.c Wed Oct 1 07:22:54 2008 *************** *** 87,93 **** 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)) --- 87,93 ---- if (!numargs) return; int symbol_ids[numargs]; for (int i=0; i<numargs; i++) { ! ComValue& val = stack_arg(i); if (val.is_type(AttributeValue::CommandType)) symbol_ids[i] = val.command_symid(); else if (val.is_type(AttributeValue::StringType)) Index: ComTerp/symbolfunc.h diff -c ComTerp/symbolfunc.h:1.1 ComTerp/symbolfunc.h:1.2 *** ComTerp/symbolfunc.h:1.1 Wed Aug 29 10:37:49 2007 --- src/ComTerp/symbolfunc.h Wed Oct 1 07:22:54 2008 *************** *** 69,75 **** }; //: create symbol command for ComTerp. ! // sym|lst=symadd(symbol [symbol ...]) -- create symbol(s) and return without lookup class SymAddFunc : public ComFunc { public: SymAddFunc(ComTerp*); --- 69,75 ---- }; //: create symbol command for ComTerp. ! // sym|lst=symadd(syml|str [sym|str ...]) -- create symbol(s) and return without lookup class SymAddFunc : public ComFunc { public: SymAddFunc(ComTerp*); *************** *** 77,83 **** // virtual boolean post_eval() { return true; } virtual const char* docstring() { ! return "sym|lst=%s(symbol [symbol ...]) -- create symbol(s) and return without lookup"; } }; //: command to split a symbol or string into a list of character objects --- 77,83 ---- // virtual boolean post_eval() { return true; } virtual const char* docstring() { ! return "sym|lst=%s(sym|str [sym|str ...]) -- create symbol(s) and return without lookup"; } }; //: command to split a symbol or string into a list of character objects Index: comterp_/README diff -c comterp_/README:1.2 comterp_/README:1.3 *** comterp_/README:1.2 Tue May 6 10:55:05 2008 --- src/comterp_/README Wed Oct 1 07:22:55 2008 *************** *** 228,234 **** val|lst=symval(symbol [symbol ...]) -- return value(s) associated with symbol variables(s) ! sym|lst=symadd(symbol [symbol ...]) -- create symbol(s) and return without lookup. lst=split(symbol|string) -- split symbol or string into list of characters. --- 228,234 ---- val|lst=symval(symbol [symbol ...]) -- return value(s) associated with symbol variables(s) ! sym|lst=symadd(sym|str [sym|str ...]) -- create symbol(s) and return without lookup. lst=split(symbol|string) -- split symbol or string into list of characters. 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 Tue May 6 10:55:12 2008 --- src/man/man1/comterp.1 Wed Oct 1 07:23:02 2008 *************** *** 234,240 **** val|lst=symval(symbol [symbol ...]) -- return value(s) associated with symbol variables(s) ! sym|lst=symadd(symbol [symbol ...]) -- create symbol(s) and return without lookup. lst=split(symbol|string) -- split symbol or string into list of characters. --- 234,240 ---- val|lst=symval(symbol [symbol ...]) -- return value(s) associated with symbol variables(s) ! sym|lst=symadd(sym|str [sym|str ...]) -- create symbol(s) and return without lookup. lst=split(symbol|string) -- split symbol or string into list of characters. *** /dev/null Wed Oct 1 07:23:03 PDT 2008 --- patches/ivtools-081001-johnston-020 *************** patches/ivtools-081001-johnston-020 *** 0 **** --- 1 ---- + ivtools-081001-johnston-020 --Apple-Mail-40-56714919 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july --Apple-Mail-40-56714919 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Ivtools-patch mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ivtools-patch --Apple-Mail-40-56714919--