View | Details | Raw Unified | Return to bug 200300 | Differences between
and this patch

Collapse All | Expand All

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

Return to bug 200300