editors/fxite: Fix when Fox-1.7 option selected
Reorganizes port, rewrapps pkg-descr too. This uses a new distribution file from GitHub but for some reason the version number didn't change. PR: 200300 Submitted by: ports fury
This commit is contained in:
parent
f2f78ed881
commit
c212d6f6fd
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=399484
38 changed files with 1095 additions and 75 deletions
|
@ -2,8 +2,9 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= fxite
|
||||
PORTVERSION= 0.92
|
||||
PORTREVISION= 3
|
||||
DISTVERSIONPREFIX= FXITE-
|
||||
DISTVERSION= 0_92
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= editors
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
|
@ -12,45 +13,35 @@ COMMENT= Advanced cross-platform text editor
|
|||
LICENSE= GPLv3
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
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= autoreconf gmake pkgconfig lua:51 desktop-file-utils
|
||||
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 <bsd.port.options.mk>
|
||||
|
||||
.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
|
||||
|
||||
PLIST_FILES= bin/fxite \
|
||||
share/pixmaps/fxite.xpm \
|
||||
share/applications/fxite.desktop
|
||||
share/applications/fxite.desktop \
|
||||
share/pixmaps/fxite.xpm
|
||||
|
||||
OPTIONS_SINGLE= TOOLKIT
|
||||
OPTIONS_SINGLE_TOOLKIT= FOX16 FOX17
|
||||
OPTIONS_DEFAULT= FOX16
|
||||
|
||||
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) -lX11" \
|
||||
RESWRAP="${LOCALBASE}/bin/fox-1.7/reswrap"
|
||||
TOOLKIT_DESC= GUI toolkit
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -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
|
||||
|
|
29
editors/fxite/files/patch-fxscintilla__ScintillaFOX.cxx
Normal file
29
editors/fxite/files/patch-fxscintilla__ScintillaFOX.cxx
Normal file
|
@ -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;
|
|
@ -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<secs; i++) { // Just sleep for one second at a time, to give user a chance to cancel
|
||||
if (!breathe(L)) { return 0; }
|
||||
- fxsleep(1000000);
|
||||
+ FXThread::sleep(1000000);
|
||||
}
|
||||
if (!breathe(L)) { return 0; }
|
||||
- fxsleep(ms*1000);
|
||||
+ FXThread::sleep(ms*1000);
|
||||
return 0;
|
||||
}
|
||||
|
89
editors/fxite/files/patch-jef__compat.h
Normal file
89
editors/fxite/files/patch-jef__compat.h
Normal file
|
@ -0,0 +1,89 @@
|
|||
--- jef/compat.h.orig 2013-10-03 09:22:51 UTC
|
||||
+++ jef/compat.h
|
||||
@@ -1,3 +1,25 @@
|
||||
+/*
|
||||
+ FXiTe - The Free eXtensIble Text Editor
|
||||
+ Copyright (c) 2009-2014 Jeffrey Pohlmeyer <yetanothergeek@gmail.com>
|
||||
+
|
||||
+ 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)
|
||||
+
|
30
editors/fxite/files/patch-jef__interproc.cpp
Normal file
30
editors/fxite/files/patch-jef__interproc.cpp
Normal file
|
@ -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); }
|
11
editors/fxite/files/patch-jef__shady_tabs.h
Normal file
11
editors/fxite/files/patch-jef__shady_tabs.h
Normal file
|
@ -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);
|
|
@ -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;
|
11
editors/fxite/files/patch-src__appmain.h
Normal file
11
editors/fxite/files/patch-src__appmain.h
Normal file
|
@ -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; }
|
18
editors/fxite/files/patch-src__appwin.cpp
Normal file
18
editors/fxite/files/patch-src__appwin.cpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
--- src/appwin.cpp.orig 2013-10-03 09:22:51 UTC
|
||||
+++ src/appwin.cpp
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <fx.h>
|
||||
#include <fxkeys.h>
|
||||
|
||||
+#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"
|
48
editors/fxite/files/patch-src__appwin_base.cpp
Normal file
48
editors/fxite/files/patch-src__appwin_base.cpp
Normal file
|
@ -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();
|
11
editors/fxite/files/patch-src__appwin_base.h
Normal file
11
editors/fxite/files/patch-src__appwin_base.h
Normal file
|
@ -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();
|
11
editors/fxite/files/patch-src__appwin_pub.h
Normal file
11
editors/fxite/files/patch-src__appwin_pub.h
Normal file
|
@ -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);
|
20
editors/fxite/files/patch-src__doctabs.cpp
Normal file
20
editors/fxite/files/patch-src__doctabs.cpp
Normal file
|
@ -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;
|
67
editors/fxite/files/patch-src__fxasq.cpp
Normal file
67
editors/fxite/files/patch-src__fxasq.cpp
Normal file
|
@ -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; i<TotalSlotsInDict(&keylist); ++i)
|
||||
{
|
||||
focused_btn=-1; // Focusing a button doesn't make much sense for interactive dialogs.
|
||||
FXWindow*obj=(FXWindow*)(keylist.data(i));
|
||||
@@ -186,8 +186,8 @@ int FxAsqWin::Run(FxAsqItem**results)
|
||||
|
||||
void FxAsqWin::PutResults()
|
||||
{
|
||||
- for (FXint i=keylist.first(); i<=keylist.last(); i=keylist.next(i)) {
|
||||
- const char*k=keylist.key(i);
|
||||
+ for (FXint i=0; i<TotalSlotsInDict(&keylist); ++i) {
|
||||
+ const char*k=DictKeyName(keylist,i);
|
||||
FXWindow*obj=(FXWindow*)keylist.data(i);
|
||||
if (k&&obj) {
|
||||
if (IsGroup(obj)) {
|
||||
@@ -299,7 +299,7 @@ void FxAsqWin::Select(const char*key, co
|
||||
{
|
||||
FXHorizontalFrame *frm = new FXHorizontalFrame(userbox,LAYOUT_FILL_X);
|
||||
new FXLabel(frm,label,NULL);
|
||||
- FXListBox*list=(FXListBox*)(keylist.find(key));
|
||||
+ FXListBox*list=(FXListBox*)(LookupInDict(&keylist,key));
|
||||
if (list) {
|
||||
list->reparent(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<TotalSlotsInDict(&keylist); ++i) {
|
||||
FXWindow*obj=(FXWindow*)(keylist.data(i));
|
||||
if (IsList(obj)) {
|
||||
FXListBox*listbox=(FXListBox*)obj;
|
29
editors/fxite/files/patch-src__fxasq.h
Normal file
29
editors/fxite/files/patch-src__fxasq.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
--- src/fxasq.h.orig 2013-10-03 09:22:51 UTC
|
||||
+++ src/fxasq.h
|
||||
@@ -17,8 +17,11 @@
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
+#ifndef FXASQ_H
|
||||
+#define FXASQ_H
|
||||
|
||||
#include "fxasq_c.h"
|
||||
+#include "compat.h"
|
||||
|
||||
|
||||
class FxAsqWin: public FXObject {
|
||||
@@ -33,7 +36,7 @@ class FxAsqWin: public FXObject {
|
||||
void AppendResult(const char*key, const char*value);
|
||||
void PutResults();
|
||||
protected:
|
||||
- FXDict keylist;
|
||||
+ Dictionary keylist;
|
||||
FXVerticalFrame *userbox;
|
||||
public:
|
||||
|
||||
@@ -55,4 +58,5 @@ class FxAsqWin: public FXObject {
|
||||
void Color( const char*key, const char*value, const char*label);
|
||||
void Font( const char*key, const char*value, const char*label);
|
||||
};
|
||||
+#endif
|
||||
|
50
editors/fxite/files/patch-src__fxasq_lua.c
Normal file
50
editors/fxite/files/patch-src__fxasq_lua.c
Normal file
|
@ -0,0 +1,50 @@
|
|||
--- src/fxasq_lua.c.orig 2013-10-03 09:22:51 UTC
|
||||
+++ src/fxasq_lua.c
|
||||
@@ -31,6 +31,9 @@
|
||||
#include "intl.h"
|
||||
#include "fxasq_lua.h"
|
||||
|
||||
+#if LUA_VERSION_NUM<502
|
||||
+# define lua_rawlen lua_objlen
|
||||
+#endif
|
||||
|
||||
#define DLG_MODULE_NAME "dialog"
|
||||
#define MetaName "_fxasq_metatable"
|
||||
@@ -234,7 +237,7 @@ static int asq_new(lua_State *L) {
|
||||
if (argc>=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;
|
||||
}
|
42
editors/fxite/files/patch-src__help.cpp
Normal file
42
editors/fxite/files/patch-src__help.cpp
Normal file
|
@ -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<long>(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<SCHLP_LAST; i++) {
|
||||
content=(const char*)(sendMessage(SCI_GETCHARACTERPOINTER,0,0));
|
||||
FXRex rx(phrases[i], REX_CAPTURE|REX_NEWLINE);
|
||||
- while (rx.match(content,beg,end,REX_FORWARD,2)) {
|
||||
+ while (RxFind(rx,content,0,beg,end,2)) {
|
||||
sendMessage(SCI_SETTARGETSTART,beg[0],0);
|
||||
sendMessage(SCI_SETTARGETEND,end[0],0);
|
||||
char*tmp=my_strndup(content+beg[1], end[1]-beg[1]);
|
||||
@@ -292,7 +298,7 @@ void SciHelp::parse(const char*txt, unsi
|
||||
FXRex appname_rx("\\<"APP_NAME"\\>", 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];
|
20
editors/fxite/files/patch-src__luacmds.cpp
Normal file
20
editors/fxite/files/patch-src__luacmds.cpp
Normal file
|
@ -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;
|
9
editors/fxite/files/patch-src__luacmds.h
Normal file
9
editors/fxite/files/patch-src__luacmds.h
Normal file
|
@ -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);
|
||||
|
58
editors/fxite/files/patch-src__luafuncs.cpp
Normal file
58
editors/fxite/files/patch-src__luafuncs.cpp
Normal file
|
@ -0,0 +1,58 @@
|
|||
--- src/luafuncs.cpp.orig 2013-10-03 09:22:51 UTC
|
||||
+++ src/luafuncs.cpp
|
||||
@@ -25,8 +25,8 @@
|
||||
#include <FX88591Codec.h>
|
||||
#include <FXUTF16Codec.h>
|
||||
|
||||
-#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;
|
||||
}
|
15
editors/fxite/files/patch-src__luafuncs.h
Normal file
15
editors/fxite/files/patch-src__luafuncs.h
Normal file
|
@ -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();
|
||||
|
9
editors/fxite/files/patch-src__luafx.h
Normal file
9
editors/fxite/files/patch-src__luafx.h
Normal file
|
@ -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);
|
||||
|
103
editors/fxite/files/patch-src__macro.cpp
Normal file
103
editors/fxite/files/patch-src__macro.cpp
Normal file
|
@ -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; i<TotalSlotsInDict(&keepers); ++i) {
|
||||
PersistRecord*pr=(PersistRecord*)keepers.data(i);
|
||||
if (pr) {
|
||||
if (pr->t==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; i<TotalSlotsInDict(&keepers); ++i) {
|
||||
PersistRecord*pr=(PersistRecord*)keepers.data(i);
|
||||
+ if (!pr) { continue; }
|
||||
lua_getglobal(L, LUA_MODULE_NAME);
|
||||
lua_getfield(L,-1,PERSIST_TABLE_NAME);
|
||||
- lua_pushstring(L,keepers.key(i));
|
||||
+ lua_pushstring(L,DictKeyName(keepers,i));
|
||||
switch (pr->t) {
|
||||
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) {
|
11
editors/fxite/files/patch-src__macro.h
Normal file
11
editors/fxite/files/patch-src__macro.h
Normal file
|
@ -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);
|
12
editors/fxite/files/patch-src__menuspec.cpp
Normal file
12
editors/fxite/files/patch-src__menuspec.cpp
Normal file
|
@ -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 {
|
28
editors/fxite/files/patch-src__outpane.cpp
Normal file
28
editors/fxite/files/patch-src__outpane.cpp
Normal file
|
@ -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; i<getNumItems(); i++) {
|
||||
FXListItem *item=getItem(i);
|
||||
+#ifdef FOX_1_7_50_OR_NEWER
|
||||
+ if (rx.search(item->getText(),0,item->getText().length())>=0) {
|
||||
+#else
|
||||
if (rx.match(item->getText())) {
|
||||
+#endif
|
||||
selectItem(i);
|
||||
setCurrentItem(i);
|
||||
makeItemVisible(i);
|
113
editors/fxite/files/patch-src__prefdlg.cpp
Normal file
113
editors/fxite/files/patch-src__prefdlg.cpp
Normal file
|
@ -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);
|
||||
}
|
||||
|
11
editors/fxite/files/patch-src__prefdlg_sntx.cpp
Normal file
11
editors/fxite/files/patch-src__prefdlg_sntx.cpp
Normal file
|
@ -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;
|
||||
}
|
||||
|
10
editors/fxite/files/patch-src__recorder.cpp
Normal file
10
editors/fxite/files/patch-src__recorder.cpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- src/recorder.cpp.orig 2013-10-03 09:22:51 UTC
|
||||
+++ src/recorder.cpp
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <fx.h>
|
||||
#include <Scintilla.h>
|
||||
|
||||
+#include "compat.h"
|
||||
#include "macro.h"
|
||||
|
||||
#include "intl.h"
|
14
editors/fxite/files/patch-src__scidoc.cpp
Normal file
14
editors/fxite/files/patch-src__scidoc.cpp
Normal file
|
@ -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("\\<class\\>").search(content,strlen(content),0,strlen(content))>=0) {
|
||||
+#else
|
||||
if (FXRex("\\<class\\>").match(content)) {
|
||||
+#endif
|
||||
setLanguage("cpp");
|
||||
} else {
|
||||
setLanguage("c");
|
64
editors/fxite/files/patch-src__scisrch.cpp
Normal file
64
editors/fxite/files/patch-src__scisrch.cpp
Normal file
|
@ -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);
|
33
editors/fxite/files/patch-src__tagread.cpp
Normal file
33
editors/fxite/files/patch-src__tagread.cpp
Normal file
|
@ -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; i<TotalSlotsInDict(this); ++i) {
|
||||
+ FXString ctag=key(i);
|
||||
+ int taglen=ctag.length();
|
||||
+ if ((taglen>partlen)&&(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; i<TotalSlotsInDict(this); ++i) {
|
||||
if (data(i)) {
|
||||
- const char*ctag=key(i);
|
||||
- replace(ctag,NULL); // reset our flag
|
||||
+ FXString ctag=key(i);
|
||||
+ ReplaceInDict(this,ctag.text(),NULL); // reset our flag
|
||||
list.append(ctag);
|
||||
list.append(' ');
|
||||
}
|
11
editors/fxite/files/patch-src__tagread.h
Normal file
11
editors/fxite/files/patch-src__tagread.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- src/tagread.h.orig 2013-10-03 09:22:51 UTC
|
||||
+++ src/tagread.h
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
|
||||
|
||||
|
||||
-class AutoCompleter:public FXDict {
|
||||
+class AutoCompleter:public Dictionary {
|
||||
private:
|
||||
void Show(SciDoc*sci);
|
||||
void Parse(char startchar, const char*filename);
|
29
editors/fxite/files/patch-src__theme.cpp
Normal file
29
editors/fxite/files/patch-src__theme.cpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
--- src/theme.cpp.orig 2013-10-03 09:22:51 UTC
|
||||
+++ src/theme.cpp
|
||||
@@ -644,16 +644,16 @@ void ThemeGUI::SetDemoColors()
|
||||
long ThemeGUI::onSelectTheme(FXObject*o, FXSelector sel, void*p)
|
||||
{
|
||||
AppColors*ac=(AppColors*)(list->getItemData((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*));
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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/
|
||||
|
|
Loading…
Reference in a new issue