diff -urN /usr/ports/editors/fxite/Makefile editors/fxite/Makefile --- /usr/ports/editors/fxite/Makefile 2015-05-07 05:07:28.649385000 +0900 +++ editors/fxite/Makefile 2015-05-19 00:00:00.000000000 +0900 @@ -2,56 +2,46 @@ # $FreeBSD: head/editors/fxite/Makefile 385522 2015-05-06 15:27:43Z mat $ PORTNAME= fxite -PORTVERSION= 0.92 -PORTREVISION= 3 +DISTVERSIONPREFIX= ${PORTNAME:tu}- +DISTVERSION= 0_92 +PORTREVISION= 4 CATEGORIES= editors +MASTER_SITES= GH MAINTAINER= ports@FreeBSD.org COMMENT= Advanced cross-platform text editor LICENSE= GPLv3 -LIB_DEPENDS= # - -OPTIONS_SINGLE= #FOX -OPTIONS_SINGLE_FOX= FOX16 FOX17 -FOX16_DESC= Use FOX 1.6 -FOX17_DESC= Use FOX 1.7 -OPTIONS_DEFAULT= FOX16 - USE_GITHUB= yes GH_ACCOUNT= yetanothergeek -GH_TAGNAME= FXITE-0_91 -USES= gmake pkgconfig lua:51 desktop-file-utils -USE_AUTOTOOLS= aclocal autoconf automake -ACLOCAL_ARGS= --force -I m4 -AUTOMAKE_ARGS= --gnu --add-missing --copy +USES= autoreconf desktop-file-utils gettext gmake lua pkgconfig +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --with-system-lua \ + --with-lua-pkg=lua-${LUA_VER} + CXXFLAGS+= -fPIC LDFLAGS+= -L${LOCALBASE}/lib -lintl -CONFIGURE_ARGS+=--with-system-lua \ - --with-lua-pkg=lua-${LUA_VER} -CONFIGURE_ENV+= FOX_CFLAGS="${FOX_CFLAGS}" \ - FOX_LIBS="${FOX_LIBS}" -.include +PLIST_FILES= bin/fxite \ + share/applications/fxite.desktop \ + share/pixmaps/fxite.xpm -.if ${PORT_OPTIONS:MFOX16} -LIB_DEPENDS+= libFOX-1.6.so:${PORTSDIR}/x11-toolkits/fox16 -CONFIGURE_ENV+= RESWRAP=${LOCALBASE}/bin/reswrap -FOX_CFLAGS+= `fox-config --cflags` -FOX_LIBS+= `fox-config --libs` -.endif - -.if ${PORT_OPTIONS:MFOX17} -LIB_DEPENDS+= libFOX-1.7.so:${PORTSDIR}/x11-toolkits/fox17 -CONFIGURE_ENV+= RESWRAP=${LOCALBASE}/bin/fox-1.7/reswrap -FOX_CFLAGS+= `pkgconf fox17 --cflags` -FOX_LIBS+= `pkgconf fox17 --libs` -.endif +OPTIONS_SINGLE= TOOLKIT +OPTIONS_SINGLE_TOOLKIT= FOX16 FOX17 +OPTIONS_DEFAULT= FOX16 -PLIST_FILES= bin/fxite \ - share/pixmaps/fxite.xpm \ - share/applications/fxite.desktop +FOX16_DESC= Fox 1.6 GUI toolkit support +FOX16_LIB_DEPENDS= libFOX-1.6.so:${PORTSDIR}/x11-toolkits/fox16 +FOX16_CONFIGURE_ENV= FOX_CFLAGS="$$(fox-config --cflags)" \ + FOX_LIBS="$$(fox-config --libs)" \ + RESWRAP="${LOCALBASE}/bin/reswrap" +FOX17_DESC= Fox 1.7 GUI toolkit support +FOX17_LIB_DEPENDS= libFOX-1.7.so:${PORTSDIR}/x11-toolkits/fox17 +FOX17_CONFIGURE_ENV= FOX_CFLAGS="$$(pkgconf fox17 --cflags)" \ + FOX_LIBS="$$(pkgconf fox17 --libs)" \ + RESWRAP="${LOCALBASE}/bin/fox-1.7/reswrap" +TOOLKIT_DESC= GUI toolkit .include diff -urN /usr/ports/editors/fxite/distinfo editors/fxite/distinfo --- /usr/ports/editors/fxite/distinfo 2015-05-07 05:07:28.650671000 +0900 +++ editors/fxite/distinfo 2015-05-19 00:00:00.000000000 +0900 @@ -1,2 +1,2 @@ -SHA256 (yetanothergeek-fxite-0.92-FXITE-0_91_GH0.tar.gz) = 1d5e876eb398ae1f370fb22cc29299f8dd539dc459ecb8a35f8dbba3f2ca194c -SIZE (yetanothergeek-fxite-0.92-FXITE-0_91_GH0.tar.gz) = 1012313 +SHA256 (yetanothergeek-fxite-FXITE-0_92_GH0.tar.gz) = 4a8e1ceebed01fb10ec7c0d2851a806e8e5e2cbd9c9dcc0d6a67fbcda3c1bca2 +SIZE (yetanothergeek-fxite-FXITE-0_92_GH0.tar.gz) = 1044415 diff -urN /usr/ports/editors/fxite/files/patch-fxscintilla__ScintillaFOX.cxx editors/fxite/files/patch-fxscintilla__ScintillaFOX.cxx --- /usr/ports/editors/fxite/files/patch-fxscintilla__ScintillaFOX.cxx 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-fxscintilla__ScintillaFOX.cxx 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,29 @@ +--- fxscintilla/ScintillaFOX.cxx.orig 2013-10-03 09:22:51 UTC ++++ fxscintilla/ScintillaFOX.cxx +@@ -171,7 +171,7 @@ private: + // From ScintillaBase + virtual bool ModifyScrollBars(int nMax, int nPage); + virtual void ReconfigureScrollBars(); +- virtual PRectangle GetClientRectangle(); ++ virtual PRectangle GetClientRectangle() const; + virtual int KeyDefault(int key, int modifiers); + + // Popup flag +@@ -662,7 +662,7 @@ sptr_t ScintillaFOX::DirectFunction( + return sciThis->WndProc(iMessage, wParam, lParam); + } + +-PRectangle ScintillaFOX::GetClientRectangle() { ++PRectangle ScintillaFOX::GetClientRectangle() const { + // Have to call FXScrollArea::getViewportXxxx instead of getViewportXxxx + // to prevent infinite loop + #ifdef FOX_1_6 +@@ -1256,7 +1256,7 @@ long FXScintilla::onDNDMotion(FXObject* + FXDragAction action; + FXint pos; + // Scroll into view +- if(startAutoScroll(ev, TRUE)) return 1; ++ if(startAutoScroll(ev, true)) return 1; + + // Handled elsewhere + if(FXScrollArea::onDNDMotion(sender,sel,ptr)) return 1; diff -urN /usr/ports/editors/fxite/files/patch-fxsleep editors/fxite/files/patch-fxsleep --- /usr/ports/editors/fxite/files/patch-fxsleep 2014-06-21 17:47:53.000000000 +0900 +++ editors/fxite/files/patch-fxsleep 1970-01-01 09:00:00.000000000 +0900 @@ -1,15 +0,0 @@ ---- src/luafuncs.cpp.orig 2013-09-18 14:19:18.000000000 +0200 -+++ src/luafuncs.cpp 2013-09-18 14:19:36.000000000 +0200 -@@ -942,10 +942,10 @@ - ms=ms%1000; - for (int i=0; i ++ ++ This program is free software; you can redistribute it and/or modify it ++ under the terms of the GNU General Public License version 3 as ++ published by the Free Software Foundation. ++ ++ This software is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++*/ ++ ++#if (FOX_MAJOR==1) && (FOX_MINOR==6) && !defined(FOX_1_6) ++# define FOX_1_6 ++#endif ++ + #ifdef FOX_1_6 + # define ONE_SECOND ((FXuint)1000) + # define PathMatch(pattern,file,flags) FXPath::match(pattern,file,flags) +@@ -20,8 +42,16 @@ FXbool LocaleIsUTF8(); + # define FILEMATCH_NOESCAPE FXPath::NoEscape + # define FILEMATCH_FILE_NAME FXPath::PathName + # define FILEMATCH_CASEFOLD FXPath::CaseFold +-# define REX_FORWARD FXRex::Forward +-# define REX_BACKWARD FXRex::Backward ++# if (FOX_MAJOR>1) || (FOX_MINOR>7) || (FOX_LEVEL>49) ++# define FOX_1_7_50_OR_NEWER ++# endif ++# ifdef FOX_1_7_50_OR_NEWER ++# define REX_FORWARD 0 ++# define REX_BACKWARD 0 ++# else ++# define REX_FORWARD FXRex::Forward ++# define REX_BACKWARD FXRex::Backward ++# endif + # define REX_CAPTURE FXRex::Capture + # define REX_NEWLINE FXRex::Newline + # define REX_NORMAL FXRex::Normal +@@ -35,6 +65,9 @@ FXbool LocaleIsUTF8(); + # if (FOX_MAJOR>1)||(FOX_MINOR>7)||(FOX_LEVEL>26) + # define fxgetpid() (FXProcess::current()) + # endif ++# if (FOX_MAJOR>1) || (FOX_MINOR>7) || (FOX_LEVEL>44) ++# define FOX_1_7_45_OR_NEWER ++# endif + #endif + + +@@ -69,8 +102,31 @@ bool IsDesktopCurrent(FXMainWindow*tw); + # endif + #endif + ++#ifdef FOX_1_7_45_OR_NEWER ++# define Dictionary FXDictionary ++# define DictKeyName(d,n) ((d).key(n).text()) ++# define TotalSlotsInDict(d) ((d)->no()) ++# define UsedSlotsInDict(d) ((d)->used()) ++# define ReplaceInDict(d,k,v) ((d)->at(k)=(v)) ++# define LookupInDict(d,k) ((d)->at(k)) ++#else ++# define Dictionary FXDict ++# define DictKeyName(d,n) ((d).key(n)) ++# define TotalSlotsInDict(d) ((d)->size()) ++# define UsedSlotsInDict(d) ((d)->no()) ++# define ReplaceInDict(d,k,v) ((d)->replace((k),(v))) ++# define LookupInDict(d,k) ((d)->find(k)) ++#endif + + FXID GetNetActiveWindow(); + + void WaitForWindowFocus(FXTopWindow*w, FXuint msecs=1000); + ++// #define SetPadLRTB(o,l,r,t,b) \ ++// (o)->setPadLeft(l); \ ++// (o)->setPadRight(r); \ ++// (o)->setPadTop(t); \ ++// (o)->setPadBottom(b); ++// ++// #define SetPad(o,p) SetPadLRTB(o,p,p,p,p) ++ diff -urN /usr/ports/editors/fxite/files/patch-jef__interproc.cpp editors/fxite/files/patch-jef__interproc.cpp --- /usr/ports/editors/fxite/files/patch-jef__interproc.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-jef__interproc.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,30 @@ +--- jef/interproc.cpp.orig 2013-10-03 09:22:51 UTC ++++ jef/interproc.cpp +@@ -323,6 +323,18 @@ static int SocketFailure(const char*func + } + + ++#if (FOX_MINOR>6) ++# if (FOX_MAJOR>1) || (FOX_MINOR>7) || (FOX_LEVEL>49) ++# define FOX_1_7_50_OR_NEWER ++# endif ++#endif ++ ++#ifdef FOX_1_7_50_OR_NEWER ++# define LookupInHash(d,k) ((d)->at(k)) ++#else ++# define LookupInHash(d,k) ((d)->find(k)) ++#endif ++ + + long InterProc::onSocketRead(FXObject*o,FXSelector sel,void*p) + { +@@ -344,7 +356,7 @@ long InterProc::onSocketRead(FXObject*o, + ssize_t len=0; + char buf[bufsize]; + int read_fd=(FXival)p; +- FXString*s=(FXString*)connlist->find(p); ++ FXString*s=(FXString*)LookupInHash(connlist,p); + do { + len=read(read_fd,buf,bufsize); + if (len>0) { s->append(buf, len); } diff -urN /usr/ports/editors/fxite/files/patch-jef__shady_tabs.h editors/fxite/files/patch-jef__shady_tabs.h --- /usr/ports/editors/fxite/files/patch-jef__shady_tabs.h 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-jef__shady_tabs.h 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,11 @@ +--- jef/shady_tabs.h.orig 2013-10-03 09:22:51 UTC ++++ jef/shady_tabs.h +@@ -28,7 +28,7 @@ protected: + void UpdateTabs(); + public: + long onCmdOpenItem ( FXObject* sender, FXSelector sel, void* p ); +- void setCurrent(FXint i, FXbool notify=FALSE); ++ void setCurrent(FXint i, FXbool notify=false); + ShadyTabs(FXComposite* p,FXObject* tgt=NULL, FXSelector sel=0, FXuint opts=TABBOOK_NORMAL, + FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_SPACING, + FXint pr=DEFAULT_SPACING, FXint pt=DEFAULT_SPACING, FXint pb=DEFAULT_SPACING); diff -urN /usr/ports/editors/fxite/files/patch-jef_compat.cpp editors/fxite/files/patch-jef_compat.cpp --- /usr/ports/editors/fxite/files/patch-jef_compat.cpp 2014-06-21 17:47:53.000000000 +0900 +++ editors/fxite/files/patch-jef_compat.cpp 1970-01-01 09:00:00.000000000 +0900 @@ -1,11 +0,0 @@ ---- jef/compat.cpp.orig 2013-04-02 11:39:14.000000000 +0200 -+++ jef/compat.cpp 2013-04-02 11:39:34.000000000 +0200 -@@ -292,7 +292,7 @@ - - - --static bool ClientMsg(FXTopWindow*w, const char *msg, ulong d0=0, ulong d1=0, ulong d2=0, ulong d3=0, ulong d4=0) { -+static bool ClientMsg(FXTopWindow*w, const char *msg, FXulong d0=0, FXulong d1=0, FXulong d2=0, FXulong d3=0, FXulong d4=0) { - Display*dpy=(Display*)w->getApp()->getDisplay(); - Window root=w->getApp()->getRootWindow()->id(); - XEvent event; diff -urN /usr/ports/editors/fxite/files/patch-src__appmain.h editors/fxite/files/patch-src__appmain.h --- /usr/ports/editors/fxite/files/patch-src__appmain.h 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__appmain.h 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,11 @@ +--- src/appmain.h.orig 2013-10-03 09:22:51 UTC ++++ src/appmain.h +@@ -49,7 +49,7 @@ public: + long onIpcExec(FXObject*o,FXSelector sel,void*p); + AppClass(const FXString& name, const FXString& title); + void exit(FXint code); +- virtual void init(int& argc,char** argv,bool connect=TRUE); ++ virtual void init(int& argc,char** argv,bool connect=true); + FXString &Commands() { return commands; } + const FXString &ConfigDir() { return configdir; } + const FXString &SessionFile() { return sessionfile; } diff -urN /usr/ports/editors/fxite/files/patch-src__appwin.cpp editors/fxite/files/patch-src__appwin.cpp --- /usr/ports/editors/fxite/files/patch-src__appwin.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__appwin.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,18 @@ +--- src/appwin.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/appwin.cpp +@@ -20,6 +20,7 @@ + #include + #include + ++#include "compat.h" + #include "scidoc.h" + #include "doctabs.h" + #include "search.h" +@@ -36,7 +37,6 @@ + #include "statusbar.h" + #include "scidoc_util.h" + #include "foreachtab.h" +-#include "compat.h" + + #include "intl.h" + #include "appwin.h" diff -urN /usr/ports/editors/fxite/files/patch-src__appwin_base.cpp editors/fxite/files/patch-src__appwin_base.cpp --- /usr/ports/editors/fxite/files/patch-src__appwin_base.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__appwin_base.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,48 @@ +--- src/appwin_base.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/appwin_base.cpp +@@ -25,6 +25,7 @@ + #include "prefs.h" + #include "lang.h" + ++#include "compat.h" + #include "scidoc.h" + #include "filer.h" + #include "toolmgr.h" +@@ -45,7 +46,6 @@ + #include "cmd_utils.h" + #include "scidoc_util.h" + #include "foreachtab.h" +-#include "compat.h" + + #include "intl.h" + #include "appwin_base.h" +@@ -405,7 +405,14 @@ long TopWindowBase::onTimer(FXObject*o, + long TopWindowBase::onCloseWait(FXObject*o, FXSelector sel, void*p) + { + if (FXSELTYPE(sel)==SEL_CHORE) { +- getApp()->addTimeout(this,ID_CLOSEWAIT, ONE_SECOND/10, NULL); ++ static FXint CloseWaitChoreCount=10; ++ if (CloseWaitChoreCount>0) { ++ CloseWaitChoreCount--; ++ getApp()->addChore(this,ID_CLOSEWAIT, NULL); ++ } else { ++ CloseWaitChoreCount=10; ++ getApp()->addTimeout(this,ID_CLOSEWAIT, ONE_SECOND/10, NULL); ++ } + } else { + close(); + } +@@ -1246,7 +1253,12 @@ void TopWindowBase::ParseCommands(FXStri + FXString filename=sect.text(); + if (rowcol.empty()) { + FXint beg,end; +- if (rx_rowcol.match(filename,&beg,&end)) { ++#ifdef FOX_1_7_50_OR_NEWER ++ if (rx_rowcol.search(filename,0,filename.length(),Normal,&beg,&end,1)>=0) ++#else ++ if (rx_rowcol.match(filename,&beg,&end)) ++#endif ++ { + if (!FXStat::isFile(filename)) { + rowcol=filename.mid(beg,end-beg).text(); + filename=filename.left(beg).text(); diff -urN /usr/ports/editors/fxite/files/patch-src__appwin_base.h editors/fxite/files/patch-src__appwin_base.h --- /usr/ports/editors/fxite/files/patch-src__appwin_base.h 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__appwin_base.h 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,11 @@ +--- src/appwin_base.h.orig 2013-10-03 09:22:51 UTC ++++ src/appwin_base.h +@@ -114,7 +114,7 @@ public: + virtual ~TopWindowBase(); + static TopWindowBase* instance(); + virtual void create(); +- virtual FXbool close(FXbool notify=FALSE); ++ virtual FXbool close(FXbool notify=false); + void ParseCommands(FXString &commands); + bool Closing(); + bool IsMacroCancelled(); diff -urN /usr/ports/editors/fxite/files/patch-src__appwin_pub.h editors/fxite/files/patch-src__appwin_pub.h --- /usr/ports/editors/fxite/files/patch-src__appwin_pub.h 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__appwin_pub.h 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,11 @@ +--- src/appwin_pub.h.orig 2013-10-03 09:22:51 UTC ++++ src/appwin_pub.h +@@ -55,7 +55,7 @@ public: + static void ParseCommands(FXString &commands); + static FXMainWindow* instantiate(FXApp*a); + static void create(); +- static FXbool close(FXbool notify=FALSE); ++ static FXbool close(FXbool notify=false); + static FXMainWindow* instance(); + static void DumpLexers(); + static void FindText(const char*searchfor, FXuint searchmode, bool forward); diff -urN /usr/ports/editors/fxite/files/patch-src__doctabs.cpp editors/fxite/files/patch-src__doctabs.cpp --- /usr/ports/editors/fxite/files/patch-src__doctabs.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__doctabs.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,20 @@ +--- src/doctabs.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/doctabs.cpp +@@ -56,7 +56,7 @@ long DocTabs::onDnd(FXObject* sender,FXS + switch (FXSELTYPE(sel)) { + case SEL_DND_ENTER: { + if (getApp()->getCursorWindow()==this) { return 0; } +- setDragRectangle(0,0,width,height,FALSE); ++ setDragRectangle(0,0,width,height,false); + if (offeredDNDType(FROM_DRAGNDROP,urilistType)) { + acceptDrop(); + dnd_accept=true; +@@ -504,7 +504,7 @@ long DocTab::onDnd(FXObject* sender,FXSe + FXEvent* ev=(FXEvent*)p; + switch(FXSELTYPE(sel)) { + case SEL_DND_ENTER: { +- setDragRectangle(0,0,width,height,FALSE); ++ setDragRectangle(0,0,width,height,false); + if (offeredDNDType(FROM_DRAGNDROP,FxteDnDTabType)) { + acceptDrop(); + dnd_accept=true; diff -urN /usr/ports/editors/fxite/files/patch-src__fxasq.cpp editors/fxite/files/patch-src__fxasq.cpp --- /usr/ports/editors/fxite/files/patch-src__fxasq.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__fxasq.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,67 @@ +--- src/fxasq.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/fxasq.cpp +@@ -133,7 +133,7 @@ int FxAsqWin::Run(FxAsqItem**results) + dlg->create(); + dlg->setWidth(dlg->getDefaultWidth()); + dlg->setHeight(dlg->getDefaultHeight()); +- for (FXint i=keylist.first(); i<=keylist.last(); i=keylist.next(i)) ++ if (UsedSlotsInDict(&keylist)>0) for (FXint i=0; ireparent(frm); + void*p=list->getUserData(); +@@ -315,7 +315,7 @@ void FxAsqWin::Select(const char*key, co + + void FxAsqWin::Option(const char*key, const char*value, const char*label) + { +- FXListBox*list=(FXListBox*)(keylist.find(key)); ++ FXListBox*list=(FXListBox*)(LookupInDict(&keylist,key)); + if (!IsList(list)) { + list=new FXListBox(userbox,NULL,0,LISTBOX_OPTS); + keylist.insert(key,list); +@@ -327,7 +327,7 @@ void FxAsqWin::Option(const char*key, co + + void FxAsqWin::Group(const char*key, const char*value, const char*label) + { +- GroupBox*grp=(GroupBox*)(keylist.find(key)); ++ GroupBox*grp=(GroupBox*)(LookupInDict(&keylist,key)); + if (grp) { + ((FXWindow*)grp)->reparent(userbox); + grp->setText(label); +@@ -341,7 +341,7 @@ void FxAsqWin::Group(const char*key, con + + void FxAsqWin::Radio(const char*key, const char*value, const char*label) + { +- GroupBox*grp=(GroupBox*)(keylist.find(key)); ++ GroupBox*grp=(GroupBox*)(LookupInDict(&keylist,key)); + if (!IsGroup(grp)) { + grp=new GroupBox(userbox,NULL); + keylist.insert(key,grp); +@@ -505,7 +505,7 @@ void FxAsqWin::Font(const char*key, cons + FxAsqWin::~FxAsqWin() + { + void*p=NULL; +- for (FXint i=keylist.first(); i<=keylist.last(); i=keylist.next(i)) { ++ for (FXint i=0; i=2) { + luaL_argcheck(L,lua_istable(L,2),2,_("expected table")); + } +- n=lua_objlen(L,2); ++ n=lua_rawlen(L,2); + for (i=1;i<=n; i++) { + lua_rawgeti(L,2,i); + char msg[64]; +@@ -301,7 +304,7 @@ static int asq_done(lua_State *L) + + + +-static const struct luaL_reg asq_funcs[] = { ++static const struct luaL_Reg asq_funcs[] = { + {"new", asq_new}, + {"run", asq_run}, + {"label", asq_label}, +@@ -330,12 +333,15 @@ int luaopen_dialog(lua_State *L) + lua_pushvalue(L, -2); + lua_settable(L, -3); + +- luaL_getmetatable(L, MetaName); + lua_pushstring(L,"__gc"); + lua_pushcfunction(L,asq_done); + lua_rawset(L,-3); + +- luaL_register(L, NULL, &asq_funcs[1]); +- luaL_register(L, DLG_MODULE_NAME, asq_funcs); +- return 0; ++#if LUA_VERSION_NUM < 502 ++ luaL_Register(L, NULL, &asq_funcs[1]); ++ luaL_Register(L, DLG_MODULE_NAME, asq_funcs); ++#else ++ luaL_setfuncs(L,asq_funcs,0); ++#endif ++ return 1; + } diff -urN /usr/ports/editors/fxite/files/patch-src__help.cpp editors/fxite/files/patch-src__help.cpp --- /usr/ports/editors/fxite/files/patch-src__help.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__help.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,42 @@ +--- src/help.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/help.cpp +@@ -36,6 +36,12 @@ + #define sendString(iMessage, wParam, lParam) sendMessage(iMessage, wParam, reinterpret_cast(lParam)) + + ++#ifdef FOX_1_7_50_OR_NEWER ++# define RxFind(rx,subj,start,beg,end,npar) (rx.search(subj,strlen(subj),start,strlen(subj),FXRex::Normal,beg,end,npar)>=0) ++#else ++# define RxFind(rx,subj,start,beg,end,npar) (rx.match(subj,beg,end,REX_FORWARD,npar,start)) ++#endif ++ + + enum { + SCHLP_FIXED, +@@ -224,7 +230,7 @@ void SciHelp::replace(const char*oldstr, + FXRex generic_rx(oldstr, REX_NORMAL|REX_NEWLINE); + content=(const char*)(sendMessage(SCI_GETCHARACTERPOINTER,0,0)); + FXint n=strlen(newstr); +- while (generic_rx.match(content,beg,end,REX_FORWARD,1)) { ++ while (RxFind(generic_rx,content,0,beg,end,1)) { + sendMessage(SCI_SETTARGETSTART,beg[0],0); + sendMessage(SCI_SETTARGETEND,end[0],0); + sendString(SCI_REPLACETARGET,n,newstr); +@@ -261,7 +267,7 @@ void SciHelp::parse(const char*txt, unsi + for (FXint i=SCHLP_FIRST; i", REX_NORMAL|REX_NEWLINE); + content=(const char*)(sendMessage(SCI_GETCHARACTERPOINTER,0,0)); + FXint p=0; +- while (appname_rx.match(content,beg,end,REX_FORWARD,1, p)) { ++ while (RxFind(appname_rx,content,p,beg,end,1)) { + sendMessage(SCI_STARTSTYLING,beg[0],0xff); + sendMessage(SCI_SETSTYLING,(end[0]-beg[0]),SCHLP_LOGO); + p=end[0]; diff -urN /usr/ports/editors/fxite/files/patch-src__luacmds.cpp editors/fxite/files/patch-src__luacmds.cpp --- /usr/ports/editors/fxite/files/patch-src__luacmds.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__luacmds.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,20 @@ +--- src/luacmds.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/luacmds.cpp +@@ -530,7 +530,7 @@ static int view_clear_output(lua_State* + } + + +-static const struct luaL_reg fxte_commands[] = { ++static const struct luaL_Reg fxte_commands[] = { + {"file_new", file_new}, + {"file_open", file_open}, + {"file_reload", file_reload}, +@@ -585,7 +585,7 @@ static const struct luaL_reg fxte_comman + + + +-const luaL_reg* LuaCommands(FXMainWindow*topwin) ++const luaL_Reg* LuaCommands(FXMainWindow*topwin) + { + if (!tw) { + tw=(TopWindow*)topwin; diff -urN /usr/ports/editors/fxite/files/patch-src__luacmds.h editors/fxite/files/patch-src__luacmds.h --- /usr/ports/editors/fxite/files/patch-src__luacmds.h 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__luacmds.h 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,9 @@ +--- src/luacmds.h.orig 2013-10-03 09:22:51 UTC ++++ src/luacmds.h +@@ -17,5 +17,5 @@ + */ + + +-const luaL_reg* LuaCommands(FXMainWindow*topwin); ++const luaL_Reg* LuaCommands(FXMainWindow*topwin); + diff -urN /usr/ports/editors/fxite/files/patch-src__luafuncs.cpp editors/fxite/files/patch-src__luafuncs.cpp --- /usr/ports/editors/fxite/files/patch-src__luafuncs.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__luafuncs.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,58 @@ +--- src/luafuncs.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/luafuncs.cpp +@@ -25,8 +25,8 @@ + #include + #include + +-#include "macro.h" + #include "compat.h" ++#include "macro.h" + #include "appwin_pub.h" + #include "scidoc.h" + #include "doctabs.h" +@@ -38,6 +38,9 @@ + #include "intl.h" + #include "luafuncs.h" + ++#if LUA_VERSION_NUM<502 ++# define lua_rawlen lua_objlen ++#endif + + + /* +@@ -86,7 +89,7 @@ static bool check_find_flags(lua_State* + { + flags=0; + luaL_argcheck(L, lua_istable(L,pos), pos, _("expected table")); +- int n=lua_objlen(L, pos); ++ int n=lua_rawlen(L, pos); + for (int i=1; i<=n; i++) { + lua_rawgeti(L, pos, i); + if (lua_isstring(L,-1)) { +@@ -287,7 +290,7 @@ static int select(lua_State* L) + sel_start=luaL_checkinteger(L,1); + sel_end=(1==argc)?sel_start:luaL_checkinteger(L,2); + sci->sendMessage(SCI_SETSELECTIONMODE, rectsel?SC_SEL_RECTANGLE:SC_SEL_STREAM, 0); +- sci->sendMessage(SCI_SETCURRENTPOS, sel_end, FALSE); ++ sci->sendMessage(SCI_SETCURRENTPOS, sel_end, false); + sci->sendMessage(SCI_SETANCHOR, sel_start, 0); + sci->ScrollCaret(); + sci->sendMessage(SCI_SETSELECTIONMODE, rectsel?SC_SEL_RECTANGLE:SC_SEL_STREAM, 0); +@@ -1354,7 +1357,7 @@ static int tagfiles(lua_State* L) + + + +-static const struct luaL_reg fxte_funcs[] = { ++static const struct luaL_Reg fxte_funcs[] = { + {"seltext", seltext}, + {"text", text}, + {"documents", documents}, +@@ -1403,7 +1406,7 @@ static const struct luaL_reg fxte_funcs[ + + + +-const luaL_reg* LuaFuncs() ++const luaL_Reg* LuaFuncs() + { + return fxte_funcs; + } diff -urN /usr/ports/editors/fxite/files/patch-src__luafuncs.h editors/fxite/files/patch-src__luafuncs.h --- /usr/ports/editors/fxite/files/patch-src__luafuncs.h 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__luafuncs.h 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,15 @@ +--- src/luafuncs.h.orig 2013-10-03 09:22:51 UTC ++++ src/luafuncs.h +@@ -17,10 +17,10 @@ + */ + + +-struct luaL_reg; ++struct luaL_Reg; + class TopWindow; + +-const luaL_reg* LuaFuncs(); ++const luaL_Reg* LuaFuncs(); + void LuaFuncsCleanup(); + const char *LuaQuitMessage(); + diff -urN /usr/ports/editors/fxite/files/patch-src__luafx.h editors/fxite/files/patch-src__luafx.h --- /usr/ports/editors/fxite/files/patch-src__luafx.h 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__luafx.h 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,9 @@ +--- src/luafx.h.orig 2013-10-03 09:22:51 UTC ++++ src/luafx.h +@@ -17,5 +17,5 @@ + */ + + +-const luaL_reg* LuaFxUtils(FXWindow*topwin, const char*exe_name); ++const luaL_Reg* LuaFxUtils(FXWindow*topwin, const char*exe_name); + diff -urN /usr/ports/editors/fxite/files/patch-src__macro.cpp editors/fxite/files/patch-src__macro.cpp --- /usr/ports/editors/fxite/files/patch-src__macro.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__macro.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,103 @@ +--- src/macro.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/macro.cpp +@@ -47,7 +47,7 @@ MacroRunner::~MacroRunner() + /* Catch and report script errors */ + static FXint traceback(lua_State *L) + { +- lua_getfield(L, LUA_GLOBALSINDEX, "debug"); ++ lua_getglobal(L, "debug"); + if (!lua_istable(L, -1)) { + lua_pop(L, 1); + return 1; +@@ -324,7 +324,7 @@ static void debug_hook(lua_State *L, lua + /* Override a builtin Lua function, or add a new one if it doesn't exist */ + static void override(lua_State *L, const char*module, const char* funcname, lua_CFunction newfunc) + { +- lua_getfield(L,LUA_GLOBALSINDEX,module); ++ lua_getglobal(L,module); + if (lua_istable(L,-1)) { + lua_pushstring(L,funcname); + if (newfunc) { +@@ -342,7 +342,7 @@ static void override(lua_State *L, const + /* Don't let scripts try to read from stdin, as this would block indefinitely */ + static void close_stdin(lua_State *L) + { +- lua_getfield(L, LUA_GLOBALSINDEX, "io"); ++ lua_getglobal(L, "io"); + if (!lua_istable(L, -1)) { + lua_pop(L, 1); + return; +@@ -384,7 +384,7 @@ typedef struct { + + void MacroRunner::ClearKeepers() + { +- for (FXint i=keepers.first(); i<=keepers.last(); i=keepers.next(i)) { ++ if (UsedSlotsInDict(&keepers)>0) for (FXint i=0; it==LUA_TSTRING) { +@@ -406,11 +406,12 @@ void MacroRunner::PushKeepers(lua_State + lua_pushstring(L,PERSIST_TABLE_NAME); + lua_newtable(L); + lua_settable(L, -3); +- for (FXint i=keepers.first(); i<=keepers.last(); i=keepers.next(i)) { ++ if (UsedSlotsInDict(&keepers)>0) for (FXint i=0; it) { + case LUA_TNUMBER: { lua_pushnumber(L, pr->n); break;} + case LUA_TBOOLEAN:{ lua_pushboolean(L, pr->b); break;} +@@ -455,7 +456,7 @@ void MacroRunner::PopKeepers(lua_State * + } + } + if (pr) { +- keepers.replace(lua_tostring(L,-2), pr); ++ ReplaceInDict(&keepers,lua_tostring(L,-2),pr); + } + } + lua_pop(L, 1); +@@ -479,6 +480,9 @@ bool MacroRunner::RunMacro(const FXStrin + lua_State *L=luaL_newstate(); + luaL_openlibs(L); + luaopen_dialog(L); ++#if LUA_VERSION_NUM>=502 ++ lua_setglobal(L, "dialog"); ++#endif + override(L,"os","exit", osexit); + override(L,"io","stdin", NULL); + override(L,"_G","print", print); +@@ -487,11 +491,27 @@ bool MacroRunner::RunMacro(const FXStrin + si->script=isfilename?source.text():NULL; + states.append(si); + lua_sethook(L,debug_hook,LUA_MASKLINE,1); +- luaL_register(L, LUA_MODULE_NAME, LuaFuncs()); +- luaL_register(L, LUA_MODULE_NAME, LuaFxUtils(TopWinPub::instance(), EXE_NAME)); ++#if LUA_VERSION_NUM<502 ++ luaL_Register(L, LUA_MODULE_NAME, LuaFuncs()); ++ luaL_Register(L, LUA_MODULE_NAME, LuaFxUtils(TopWinPub::instance(), EXE_NAME)); ++ luaL_Register(L, LUA_MODULE_NAME, LuaCommands(TopWinPub::instance())); ++#else ++ int n=0; ++ const luaL_Reg*p; ++ const luaL_Reg*funcs = LuaFuncs(); ++ const luaL_Reg*utils = LuaFxUtils(TopWinPub::instance(), EXE_NAME); ++ const luaL_Reg*cmds = LuaCommands(TopWinPub::instance()); ++ for (p=funcs; p->name; p++) { n++; } ++ for (p=utils; p->name; p++) { n++; } ++ for (p=cmds; p->name; p++) { n++; } ++ lua_createtable(L, 0, n); ++ luaL_setfuncs(L, funcs, 0); ++ luaL_setfuncs(L, utils, 0); ++ luaL_setfuncs(L, cmds, 0); ++ lua_setglobal(L, LUA_MODULE_NAME); ++#endif + override(L,LUA_MODULE_NAME,"script", scriptname); + override(L,LUA_MODULE_NAME,"optimize", optimize); +- luaL_openlib(L, LUA_MODULE_NAME, LuaCommands(TopWinPub::instance()), 0); + set_string_token(L, "_VERSION", VERSION); + PushKeepers(L); + if (isfilename) { diff -urN /usr/ports/editors/fxite/files/patch-src__macro.h editors/fxite/files/patch-src__macro.h --- /usr/ports/editors/fxite/files/patch-src__macro.h 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__macro.h 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,11 @@ +--- src/macro.h.orig 2013-10-03 09:22:51 UTC ++++ src/macro.h +@@ -25,7 +25,7 @@ struct lua_State; + + class MacroRunner: public FXObject { + private: +- FXDict keepers; // <- Data stored between Lua states ++ Dictionary keepers; // <- Data stored between Lua states + void ClearKeepers(); + void PushKeepers(lua_State *L); + void PopKeepers(lua_State *L); diff -urN /usr/ports/editors/fxite/files/patch-src__menuspec.cpp editors/fxite/files/patch-src__menuspec.cpp --- /usr/ports/editors/fxite/files/patch-src__menuspec.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__menuspec.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,12 @@ +--- src/menuspec.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/menuspec.cpp +@@ -616,7 +616,8 @@ void MenuMgr::ReadPopupMenu(FXRegistry*r + memset(keyname,0, sizeof(keyname)); + snprintf(keyname,sizeof(keyname)-1,"Command_%d", i+1); + if (reg->existingEntry(popup_sect,keyname)) { +- PopupCommands[i]=strdup(reg->readStringEntry(popup_sect,keyname)); ++ const char*tmp=reg->readStringEntry(popup_sect,keyname); ++ PopupCommands[i]=strdup(tmp?tmp:""); + } + } + } else { diff -urN /usr/ports/editors/fxite/files/patch-src__outpane.cpp editors/fxite/files/patch-src__outpane.cpp --- /usr/ports/editors/fxite/files/patch-src__outpane.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__outpane.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,28 @@ +--- src/outpane.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/outpane.cpp +@@ -115,7 +115,12 @@ void OutputList::GoToError() + FXint begs[4]={0,0,0,0}; + FXint ends[4]={0,0,0,0}; + FXRex rx(pats[i].pat, REX_CAPTURE); +- if (rx.match(txt,begs,ends,REX_FORWARD,3)) { ++#ifdef FOX_1_7_50_OR_NEWER ++ if (rx.search(txt,0,txt.length(),FXRex::Normal,begs,ends,3)>=0) ++#else ++ if (rx.match(txt,begs,ends,REX_FORWARD,3)) ++#endif ++ { + FXString filename = txt.mid(begs[1],ends[1]-begs[1]); + FXString linenum = txt.mid(begs[2],ends[2]-begs[2]); + if (FXStat::isFile(filename)) { +@@ -228,7 +233,11 @@ void OutputList::SelectFirstError() + FXRex rx(_(": [Ee]rror: ")); + for (FXint i=0; igetText(),0,item->getText().length())>=0) { ++#else + if (rx.match(item->getText())) { ++#endif + selectItem(i); + setCurrentItem(i); + makeItemVisible(i); diff -urN /usr/ports/editors/fxite/files/patch-src__prefdlg.cpp editors/fxite/files/patch-src__prefdlg.cpp --- /usr/ports/editors/fxite/files/patch-src__prefdlg.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__prefdlg.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,113 @@ +--- src/prefdlg.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/prefdlg.cpp +@@ -415,13 +415,13 @@ void PrefsDialog::MakeGeneralTab() + right_column=new FXVerticalFrame(hframe,FRAME_SUNKEN|LAYOUT_FILL/*|PACK_UNIFORM_HEIGHT*/); + + chk=new FXCheckButton(left_column, _("Watch files for external changes."), prefs, Settings::ID_TOGGLE_WATCH_EXTERN); +- chk->setCheck(prefs->WatchExternChanges, FALSE); ++ chk->setCheck(prefs->WatchExternChanges, false); + chk->setPadBottom(8); + + hframe=new FXHorizontalFrame(left_column); + SetPad(hframe,0); + chk=new FXCheckButton(hframe, _("Backup files every "), prefs, Settings::ID_TOGGLE_AUTOSAVE); +- chk->setCheck(prefs->Autosave, FALSE); ++ chk->setCheck(prefs->Autosave, false); + chk->setPadBottom(12); + spin=new FXSpinner(hframe, 3, prefs, Settings::ID_SET_AUTOSAVE_INT,SPIN_OPTS); + spin->setRange(15,900); +@@ -433,10 +433,10 @@ void PrefsDialog::MakeGeneralTab() + + new FXLabel(left_column, _("Ask before closing multiple files:")); + chk=new FXCheckButton(left_column, _("From menu"), prefs, Settings::ID_TOGGLE_ASK_CLOSE_MULTI_MENU); +- chk->setCheck(prefs->PromptCloseMultiMenu, FALSE); ++ chk->setCheck(prefs->PromptCloseMultiMenu, false); + chk->setPadLeft(12); + chk=new FXCheckButton(left_column, _("On exit"), prefs, Settings::ID_TOGGLE_ASK_CLOSE_MULTI_EXIT); +- chk->setCheck(prefs->PromptCloseMultiExit, FALSE); ++ chk->setCheck(prefs->PromptCloseMultiExit, false); + chk->setPadLeft(12); + chk->setPadBottom(12); + +@@ -464,15 +464,15 @@ void PrefsDialog::MakeGeneralTab() + + new FXLabel(right_column,_("Save open files before executing:")); + chk=new FXCheckButton(right_column, _("Tools->Filter Selection"), prefs, Settings::ID_SAVE_ON_FILTER_SEL); +- chk->setCheck(prefs->SaveBeforeFilterSel, FALSE); ++ chk->setCheck(prefs->SaveBeforeFilterSel, false); + chk->setPadLeft(12); + + chk=new FXCheckButton(right_column, _("Tools->Insert Command"), prefs, Settings::ID_SAVE_ON_INS_CMD); +- chk->setCheck(prefs->SaveBeforeInsCmd, FALSE); ++ chk->setCheck(prefs->SaveBeforeInsCmd, false); + chk->setPadLeft(12); + + chk=new FXCheckButton(right_column, _("Tools->Execute Command"), prefs, Settings::ID_SAVE_ON_EXEC_CMD); +- chk->setCheck(prefs->SaveBeforeExecCmd, FALSE); ++ chk->setCheck(prefs->SaveBeforeExecCmd, false); + chk->setPadLeft(12); + + #ifndef WIN32 +@@ -539,19 +539,19 @@ void PrefsDialog::MakeEditorTab() + list->setCurrentItem(prefs->AutoIndent); + + chk=new FXCheckButton(column, _("Smart home key"), prefs, Settings::ID_TOGGLE_SMART_HOME); +- chk->setCheck(prefs->SmartHome, FALSE); ++ chk->setCheck(prefs->SmartHome, false); + + chk=new FXCheckButton(column, _("Smooth scrolling"), prefs, Settings::ID_TOGGLE_SMOOTH_SCROLL); +- chk->setCheck(prefs->SmoothScroll, FALSE); ++ chk->setCheck(prefs->SmoothScroll, false); + + chk=new FXCheckButton(column, _("Allow caret beyond end of line"), prefs, Settings::ID_TOGGLE_CARET_PAST_EOL); +- chk->setCheck(prefs->CaretPastEOL, FALSE); ++ chk->setCheck(prefs->CaretPastEOL, false); + + chk=new FXCheckButton(column,_("Turn line wrapping on by default"),prefs,Settings::ID_TOGGLE_WORD_WRAP); + chk->setCheck(prefs->WordWrap); + + chk=new FXCheckButton(column, _("Wrap-aware home/end keys"), prefs, Settings::ID_TOGGLE_WRAP_AWARE); +- chk->setCheck(prefs->WrapAwareHomeEnd, FALSE); ++ chk->setCheck(prefs->WrapAwareHomeEnd, false); + + spinframe=new FXHorizontalFrame(column); + spin=new FXSpinner(spinframe, 2, prefs, Settings::ID_SET_CARET_WIDTH, SPIN_OPTS); +@@ -605,14 +605,14 @@ void PrefsDialog::MakeEditorTab() + new FXLabel(spinframe, _("Indent width")); + + chk->setUserData((void*)spin); +- chk->setCheck(prefs->UseTabs, TRUE); ++ chk->setCheck(prefs->UseTabs, true); + + new FXHorizontalSeparator(column,LAYOUT_SIDE_TOP|LAYOUT_FILL_X|SEPARATOR_GROOVE); + new FXLabel(column, _("Default search options:")); + srchopts=new SciSearchOptions(column, prefs,Settings::ID_SET_SEARCH_OPTS); + srchopts->SetSciFlags(prefs->SearchOptions); + chk=new FXCheckButton(column, _("Verbose search messages"), prefs, Settings::ID_TOGGLE_SEARCH_VERBOSE); +- chk->setCheck(prefs->SearchVerbose, FALSE); ++ chk->setCheck(prefs->SearchVerbose, false); + chk->setPadLeft(6); + + spinframe=new FXHorizontalFrame(column); +@@ -635,10 +635,10 @@ void PrefsDialog::MakeEditorTab() + + new FXHorizontalSeparator(column,LAYOUT_SIDE_TOP|LAYOUT_FILL_X|SEPARATOR_GROOVE); + chk=new FXCheckButton(column, _("Open 7-bit ASCII files as UTF-8"), prefs, Settings::ID_TOGGLE_ASCII_DEFAULT); +- chk->setCheck(!prefs->DefaultToAscii, FALSE); ++ chk->setCheck(!prefs->DefaultToAscii, false); + chk->setPadBottom(4); + chk=new FXCheckButton(column, _("Treat other files as broken UTF-8"), prefs, Settings::ID_TOGGLE_SBCS_DEFAULT); +- chk->setCheck(!prefs->DefaultToSbcs, FALSE); ++ chk->setCheck(!prefs->DefaultToSbcs, false); + chk->setPadBottom(8); + spinframe=new FXHorizontalFrame(column); + new FXLabel(spinframe, _("Default file format:")); +@@ -651,7 +651,7 @@ void PrefsDialog::MakeEditorTab() + + chk=new FXCheckButton(column, _("Show line endings with \"View Whitespace\""), + prefs, Settings::ID_TOGGLE_VIEW_WHITESPACE_EOL); +- chk->setCheck(prefs->WhitespaceShowsEOL, FALSE); ++ chk->setCheck(prefs->WhitespaceShowsEOL, false); + chk->setPadLeft(6); + } + diff -urN /usr/ports/editors/fxite/files/patch-src__prefdlg_sntx.cpp editors/fxite/files/patch-src__prefdlg_sntx.cpp --- /usr/ports/editors/fxite/files/patch-src__prefdlg_sntx.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__prefdlg_sntx.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,11 @@ +--- src/prefdlg_sntx.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/prefdlg_sntx.cpp +@@ -84,7 +84,7 @@ long MyColorWell::onDoubleClicked(FXObje + colordialog.setSelector(ID_COLORDIALOG); + colordialog.setRGBA(oldcolor); + colordialog.setOpaqueOnly(isOpaqueOnly()); +- if(!colordialog.execute(PLACEMENT_SCREEN)) { setRGBA(oldcolor,TRUE); } ++ if(!colordialog.execute(PLACEMENT_SCREEN)) { setRGBA(oldcolor,true); } + return 1; + } + diff -urN /usr/ports/editors/fxite/files/patch-src__recorder.cpp editors/fxite/files/patch-src__recorder.cpp --- /usr/ports/editors/fxite/files/patch-src__recorder.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__recorder.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,10 @@ +--- src/recorder.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/recorder.cpp +@@ -20,6 +20,7 @@ + #include + #include + ++#include "compat.h" + #include "macro.h" + + #include "intl.h" diff -urN /usr/ports/editors/fxite/files/patch-src__scidoc.cpp editors/fxite/files/patch-src__scidoc.cpp --- /usr/ports/editors/fxite/files/patch-src__scidoc.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__scidoc.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,14 @@ +--- src/scidoc.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/scidoc.cpp +@@ -620,7 +620,11 @@ bool SciDoc::SetLanguageForHeader(const + } else { + // Take a wild guess - if the file contains the word "class" it's probably C++ + const char *content=(const char*)(sendMessage(SCI_GETCHARACTERPOINTER,0,0)); ++#ifdef FOX_1_7_50_OR_NEWER ++ if (FXRex("\\").search(content,strlen(content),0,strlen(content))>=0) { ++#else + if (FXRex("\\").match(content)) { ++#endif + setLanguage("cpp"); + } else { + setLanguage("c"); diff -urN /usr/ports/editors/fxite/files/patch-src__scisrch.cpp editors/fxite/files/patch-src__scisrch.cpp --- /usr/ports/editors/fxite/files/patch-src__scisrch.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__scisrch.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,64 @@ +--- src/scisrch.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/scisrch.cpp +@@ -29,6 +29,12 @@ + #define SciMsg(im,wp,lp) sci->sendMessage(im,wp,lp) + #define SciStr(im,wp,lp) sci->sendString(im,wp,lp) + ++#ifdef FOX_1_7_50_OR_NEWER ++# define RxMatch(rx, str, len, beg, end, mode, npar, fm, to) ( ((rx)->search((str), (len), (fm), (to), (mode), (beg), (end), (npar))) >=0 ) ++#else ++# define RxMatch(rx, str, len, beg, end, mode, npar, fm, to) ( ((rx)->match ((str), (len), (beg), (end), (mode), (npar), (fm), (to))) !=0 ) ++#endif ++ + #if 1 + + // The capitalization of text inserted by `&' or `\1', `\2', ... `\9' can be altered by +@@ -222,7 +228,7 @@ int SciSearch::FindTextNoSel(const FXStr + if (fm<0) { fm=0; } + if (to>len) { to=len; } + FXuint dirn=isfwd?REX_FORWARD:REX_BACKWARD; +- if (rx.match(content,len,begs,ends,dirn,MAX_CAPTURES,fm,to)) { ++ if (RxMatch(&rx,content,len,begs,ends,dirn,MAX_CAPTURES,fm,to)) { + beg=isfwd?begs[0]:ends[0]; + end=isfwd?ends[0]:begs[0]; + return 1; +@@ -256,8 +262,8 @@ bool SciSearch::FindText(const FXString + long fm = isfwd? pos : 0; + long to = isfwd? len : (pos-1); + if ( +- rx.match(content,len,begs,ends,dirn,MAX_CAPTURES,fm,to) || +- (wrap && rx.match(content,len,begs,ends,dirn,MAX_CAPTURES,0,len)) ++ RxMatch(&rx,content,len,begs,ends,dirn,MAX_CAPTURES,fm,to) || ++ (wrap && RxMatch(&rx,content,len,begs,ends,dirn,MAX_CAPTURES,0,len)) + ) { + SciMsg(SCI_SETTARGETSTART,begs[0],0); + SciMsg(SCI_SETTARGETEND,ends[0],0); +@@ -383,8 +389,8 @@ long SciSearch::ReplaceAllInDoc(const FX + SciMsg(SCI_SETSEARCHFLAGS,0,0); + SciMsg(SCI_BEGINUNDOACTION,0,0); + while (1) { +- if (end==start) { break; } +- if (rx.match(content,end,begs,ends,srchflags,MAX_CAPTURES,start,end)) { ++ if (end<=start) { break; } ++ if (RxMatch(&rx,content,end,begs,ends,REX_FORWARD|REX_NOT_EMPTY,MAX_CAPTURES,start,end)) { + SciMsg(SCI_SETTARGETSTART,begs[0],0); + SciMsg(SCI_SETTARGETEND,ends[0],0); + FXString newstr=DoSubstitute(content,begs,ends,repl_template,MAX_CAPTURES); +@@ -438,7 +444,7 @@ long SciSearch::ReplaceAllInSel(const FX + + SciMsg(SCI_SETSEARCHFLAGS,0,0); + if (bol_only) { // Special case, start of first line +- if (rx.match(content,end,begs,ends,REX_FORWARD|REX_NOT_EMPTY,MAX_CAPTURES,start,end)) { ++ if (RxMatch(&rx,content,end,begs,ends,REX_FORWARD|REX_NOT_EMPTY,MAX_CAPTURES,start,end)) { + SciMsg(SCI_SETTARGETSTART,begs[0],0); + SciMsg(SCI_SETTARGETEND,ends[0],0); + FXString newstr=DoSubstitute(content,begs,ends,repl_template,MAX_CAPTURES); +@@ -452,7 +458,7 @@ long SciSearch::ReplaceAllInSel(const FX + long substart=start; + while (1) { + if (end<=substart) { break; } +- if (rx.match(content,end,begs,ends,srchflags,MAX_CAPTURES,substart,end)) { ++ if (RxMatch(&rx,content,end,begs,ends,srchflags,MAX_CAPTURES,substart,end)) { + SciMsg(SCI_SETTARGETSTART,begs[0],0); + SciMsg(SCI_SETTARGETEND,ends[0],0); + FXString newstr=DoSubstitute(content,begs,ends,repl_template,MAX_CAPTURES); diff -urN /usr/ports/editors/fxite/files/patch-src__tagread.cpp editors/fxite/files/patch-src__tagread.cpp --- /usr/ports/editors/fxite/files/patch-src__tagread.cpp 1970-01-01 09:00:00.000000000 +0900 +++ editors/fxite/files/patch-src__tagread.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -0,0 +1,33 @@ +--- src/tagread.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/tagread.cpp +@@ -532,11 +532,11 @@ void AutoCompleter::Show(SciDoc*sci) + if (no()&&sci->PrefixAtPos(part)) { + FXint partlen=part.length(); + FXint len=0; // save lots of reallocs by calculating overall length first +- for (FXint i=first(); i<=last(); i=next(i)) { +- const char*ctag=key(i); +- int taglen=strlen(ctag); +- if ((taglen>partlen)&&(strncmp(part.text(),ctag,partlen)==0)) { +- replace(ctag,(void*)((FXival)1)); // flag it for inclusion ++ for (FXint i=0; ipartlen)&&(compare(part,ctag,partlen)==0)) { ++ ReplaceInDict(this,ctag.text(),(void*)((FXival)1)); // flag it for inclusion + len+=taglen+1; // count its length + } + } +@@ -544,10 +544,10 @@ void AutoCompleter::Show(SciDoc*sci) + FXString list=FXString::null; + list.length(len); + list.trunc(0); +- for (FXint i=first(); i<=last(); i=next(i)) { ++ for (FXint i=0; igetItemData((FXint)((FXival)p))); +- cw_base->setRGBA(ac->base,TRUE); +- cw_bord->setRGBA(ac->border,TRUE); +- cw_fore->setRGBA(ac->fore,TRUE); +- cw_back->setRGBA(ac->back,TRUE); +- cw_self->setRGBA(ac->selfore,TRUE); +- cw_selb->setRGBA(ac->selback,TRUE); +- cw_menf->setRGBA(ac->selmenutext,TRUE); +- cw_menb->setRGBA(ac->selmenuback,TRUE); +- cw_tipf->setRGBA(ac->tipfore,TRUE); +- cw_tipb->setRGBA(ac->tipback,TRUE); ++ cw_base->setRGBA(ac->base,true); ++ cw_bord->setRGBA(ac->border,true); ++ cw_fore->setRGBA(ac->fore,true); ++ cw_back->setRGBA(ac->back,true); ++ cw_self->setRGBA(ac->selfore,true); ++ cw_selb->setRGBA(ac->selback,true); ++ cw_menf->setRGBA(ac->selmenutext,true); ++ cw_menb->setRGBA(ac->selmenuback,true); ++ cw_tipf->setRGBA(ac->tipfore,true); ++ cw_tipb->setRGBA(ac->tipback,true); + if (&custom_colors!=ac) { + memcpy(&custom_colors.base,&ac->base,sizeof(AppColors)-sizeof(char*)); + } diff -urN /usr/ports/editors/fxite/files/patch-src_export.cpp editors/fxite/files/patch-src_export.cpp --- /usr/ports/editors/fxite/files/patch-src_export.cpp 2014-07-25 18:52:47.000000000 +0900 +++ editors/fxite/files/patch-src_export.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -1,6 +1,6 @@ ---- src/export.cpp.orig 2014-07-24 14:11:00.000000000 +0200 -+++ src/export.cpp 2014-07-24 14:11:00.000000000 +0200 -@@ -464,7 +464,7 @@ +--- src/export.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/export.cpp +@@ -464,7 +464,7 @@ void SaveToPDF(SciDoc*sci, FILE *fp) } // start to write PDF file here (PDF1.4Ref(p63)) // ASCII>127 characters to indicate binary-possible stream diff -urN /usr/ports/editors/fxite/files/patch-src_luafx.cpp editors/fxite/files/patch-src_luafx.cpp --- /usr/ports/editors/fxite/files/patch-src_luafx.cpp 2014-07-25 18:52:47.000000000 +0900 +++ editors/fxite/files/patch-src_luafx.cpp 2015-05-19 00:00:00.000000000 +0900 @@ -1,6 +1,17 @@ ---- src/luafx.cpp.orig 2014-07-24 14:16:55.000000000 +0200 -+++ src/luafx.cpp 2014-07-24 14:19:21.000000000 +0200 -@@ -173,7 +173,7 @@ +--- src/luafx.cpp.orig 2013-10-03 09:22:51 UTC ++++ src/luafx.cpp +@@ -36,6 +36,10 @@ + #include "intl.h" + #include "luafx.h" + ++#if LUA_VERSION_NUM<502 ++# define lua_rawlen lua_objlen ++#endif ++ + static FXWindow*main_window=NULL; + + static const char*default_title; +@@ -173,7 +177,7 @@ static int input(lua_State*L) switch (toupper(type[0])) { case 'I' : { if (!lua_isnil(L,3)) { @@ -9,3 +20,30 @@ } opt=INPUTDIALOG_INTEGER; break; +@@ -248,7 +252,7 @@ static int choose(lua_State*L) { + FXString fmsg; + int i,n; + luaL_argcheck(L, lua_istable(L,argtbl), argtbl, _("table expected") ); +- n=lua_objlen(L,argtbl); ++ n=lua_rawlen(L,argtbl); + luaL_argcheck(L, n>0, argtbl, _("table can't be empty")); + for (i=1;i<=n; i++) { + lua_rawgeti(L,argtbl,i); +@@ -599,7 +603,7 @@ static int pid(lua_State* L) + + + +-static const struct luaL_reg fx_util_funcs[] = { ++static const struct luaL_Reg fx_util_funcs[] = { + {"message", message}, + {"confirm", confirm}, + {"input", input}, +@@ -620,7 +624,7 @@ static const struct luaL_reg fx_util_fun + + + +-const luaL_reg* LuaFxUtils(FXWindow*topwin, const char*exe_name) ++const luaL_Reg* LuaFxUtils(FXWindow*topwin, const char*exe_name) + { + default_title=exe_name; + if (!main_window) { main_window=topwin; } diff -urN /usr/ports/editors/fxite/pkg-descr editors/fxite/pkg-descr --- /usr/ports/editors/fxite/pkg-descr 2014-06-21 17:47:53.000000000 +0900 +++ editors/fxite/pkg-descr 2015-05-19 00:00:00.000000000 +0900 @@ -1,8 +1,9 @@ -FXiTe is an advanced cross-platform text editor built with the Fox GUI toolkit -and the FXScintilla text widget. It features built-in syntax highlighting for -40+ languages, an embedded Lua scripting engine, macro recording and playback, -multi-line regular expression search and replace, rudimentary ctags and calltip -support, a flexible interface to external tools, and a built-in "message window" -to capture the output of external commands such as compiler error messages, etc. +FXiTe is an advanced cross-platform text editor built with the Fox GUI +toolkit and the FXScintilla text widget. It features built-in syntax +highlighting for 40+ languages, an embedded Lua scripting engine, macro +recording and playback, multi-line regular expression search and +replace, rudimentary ctags and calltip support, a flexible interface to +external tools, and a built-in "message window" to capture the output of +external commands such as compiler error messages, etc. -WWW: http://code.google.com/p/fxite/ +WWW: https://github.com/yetanothergeek/fxite/