some mods I had in my local tree, mostly small stuff, perhaps minus the the Makefile changes

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2713 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2001-09-09 22:02:19 +00:00
parent ddc4c4ec36
commit 271f8d7eec
55 changed files with 550 additions and 396 deletions

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
# Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@ -23,6 +23,14 @@ if test $# -eq 0; then
exit 1
fi
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.in; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
case "$1" in
-h|--h|--he|--hel|--help)
@ -61,7 +69,7 @@ Supported PROGRAM values:
aclocal)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`configure.in'. You might want
you modified \`acinclude.m4' or \`$configure_ac'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
@ -70,7 +78,7 @@ WARNING: \`$1' is missing on your system. You should only need it if
autoconf)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`configure.in'. You might want to install the
you modified \`$configure_ac'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
@ -79,10 +87,10 @@ WARNING: \`$1' is missing on your system. You should only need it if
autoheader)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`configure.in'. You might want
you modified \`acconfig.h' or \`$configure_ac'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' $configure_ac`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
@ -98,7 +106,7 @@ WARNING: \`$1' is missing on your system. You should only need it if
automake)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
you modified \`Makefile.am', \`acinclude.m4' or \`$configure_ac'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |

View File

@ -222,7 +222,7 @@ if test "$ac_qt2_includes" = NO || test "$ac_qt2_libraries" = NO; then
AC_CACHE_VAL(ac_cv_have_qt2,
[#try to guess Qt2 locations
qt2_incdirs="$ac_qt2_includes usr/lib/qt2/include /usr/local/qt2/include /usr/include/qt2 /usr/X11R6/include/X11/qt2 /usr/lib/qt/include /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt $x_includes $QTINC"
qt2_incdirs="$ac_qt2_includes /usr/lib/qt2/include /usr/local/qt2/include /usr/include/qt2 /usr/X11R6/include/X11/qt2 /usr/lib/qt/include /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt $x_includes $QTINC"
test -n "$QTDIR" && qt2_incdirs="$QTDIR/include/qt2 $QTDIR/include/qt $QTDIR/include $QTDIR $qt2_incdirs"
AC_FIND_FILE(qmovie.h, $qt2_incdirs, qt2_incdir)
ac_qt2_includes="$qt2_incdir"

View File

@ -201,7 +201,7 @@ ${srcdir}/POTFILES.in: $(POTFILE_IN_DEPS)
grep -l "_(\".*\")" `find src -name \*.[hHC] -print` |\
grep -v frontends/kde |\
sed -e '/xforms.forms/d' | \
sort -f -d | uniq ) > $@-t \
sort -f -n | uniq ) > $@-t \
&& echo "src/ext_l10n.h" >> $@-t \
&& mv $@-t $@

View File

@ -10,8 +10,8 @@ src/CutAndPaste.C
src/debug.C
src/exporter.C
src/ext_l10n.h
src/figureForm.C
src/figure_form.C
src/figureForm.C
src/FontLoader.C
src/frontends/controllers/biblio.C
src/frontends/controllers/ButtonController.h
@ -69,73 +69,73 @@ src/frontends/qt2/QURL.C
src/frontends/qt2/QVCLog.C
src/frontends/xforms/combox.C
src/frontends/xforms/FileDialog.C
src/frontends/xforms/FormAboutlyx.C
src/frontends/xforms/form_aboutlyx.C
src/frontends/xforms/FormBibitem.C
src/frontends/xforms/FormAboutlyx.C
src/frontends/xforms/form_bibitem.C
src/frontends/xforms/FormBibtex.C
src/frontends/xforms/FormBibitem.C
src/frontends/xforms/form_bibtex.C
src/frontends/xforms/FormBibtex.C
src/frontends/xforms/form_browser.C
src/frontends/xforms/FormCharacter.C
src/frontends/xforms/form_character.C
src/frontends/xforms/FormCitation.C
src/frontends/xforms/FormCharacter.C
src/frontends/xforms/form_citation.C
src/frontends/xforms/FormDocument.C
src/frontends/xforms/FormCitation.C
src/frontends/xforms/form_document.C
src/frontends/xforms/FormError.C
src/frontends/xforms/FormDocument.C
src/frontends/xforms/form_error.C
src/frontends/xforms/FormERT.C
src/frontends/xforms/FormError.C
src/frontends/xforms/form_ert.C
src/frontends/xforms/FormExternal.C
src/frontends/xforms/FormERT.C
src/frontends/xforms/form_external.C
src/frontends/xforms/FormFiledialog.C
src/frontends/xforms/FormExternal.C
src/frontends/xforms/form_filedialog.C
src/frontends/xforms/FormFloat.C
src/frontends/xforms/FormFiledialog.C
src/frontends/xforms/form_float.C
src/frontends/xforms/FormGraphics.C
src/frontends/xforms/FormFloat.C
src/frontends/xforms/form_graphics.C
src/frontends/xforms/FormInclude.C
src/frontends/xforms/FormGraphics.C
src/frontends/xforms/form_include.C
src/frontends/xforms/FormIndex.C
src/frontends/xforms/FormInclude.C
src/frontends/xforms/form_index.C
src/frontends/xforms/FormIndex.C
src/frontends/xforms/FormLog.C
src/frontends/xforms/FormMathsBitmap.C
src/frontends/xforms/FormMathsDeco.C
src/frontends/xforms/form_maths_deco.C
src/frontends/xforms/FormMathsDelim.C
src/frontends/xforms/FormMathsDeco.C
src/frontends/xforms/form_maths_delim.C
src/frontends/xforms/FormMathsMatrix.C
src/frontends/xforms/FormMathsDelim.C
src/frontends/xforms/form_maths_matrix.C
src/frontends/xforms/FormMathsPanel.C
src/frontends/xforms/FormMathsMatrix.C
src/frontends/xforms/form_maths_panel.C
src/frontends/xforms/FormMathsSpace.C
src/frontends/xforms/FormMathsPanel.C
src/frontends/xforms/form_maths_space.C
src/frontends/xforms/FormMinipage.C
src/frontends/xforms/FormMathsSpace.C
src/frontends/xforms/form_minipage.C
src/frontends/xforms/FormParagraph.C
src/frontends/xforms/FormMinipage.C
src/frontends/xforms/form_paragraph.C
src/frontends/xforms/FormPreamble.C
src/frontends/xforms/FormParagraph.C
src/frontends/xforms/form_preamble.C
src/frontends/xforms/FormPreferences.C
src/frontends/xforms/FormPreamble.C
src/frontends/xforms/form_preferences.C
src/frontends/xforms/FormPrint.C
src/frontends/xforms/FormPreferences.C
src/frontends/xforms/form_print.C
src/frontends/xforms/FormRef.C
src/frontends/xforms/FormPrint.C
src/frontends/xforms/form_ref.C
src/frontends/xforms/FormSearch.C
src/frontends/xforms/FormRef.C
src/frontends/xforms/form_search.C
src/frontends/xforms/FormSpellchecker.C
src/frontends/xforms/FormSearch.C
src/frontends/xforms/form_spellchecker.C
src/frontends/xforms/FormTabular.C
src/frontends/xforms/FormSpellchecker.C
src/frontends/xforms/form_tabular.C
src/frontends/xforms/FormTabularCreate.C
src/frontends/xforms/FormTabular.C
src/frontends/xforms/form_tabular_create.C
src/frontends/xforms/FormThesaurus.C
src/frontends/xforms/FormTabularCreate.C
src/frontends/xforms/form_thesaurus.C
src/frontends/xforms/FormToc.C
src/frontends/xforms/FormThesaurus.C
src/frontends/xforms/form_toc.C
src/frontends/xforms/FormUrl.C
src/frontends/xforms/FormToc.C
src/frontends/xforms/form_url.C
src/frontends/xforms/FormUrl.C
src/frontends/xforms/FormVCLog.C
src/frontends/xforms/input_validators.C
src/frontends/xforms/Menubar_pimpl.C

View File

@ -3239,6 +3239,8 @@ void BufferView::Pimpl::specialChar(InsetSpecialChar::Kind kind)
InsetSpecialChar * new_inset =
new InsetSpecialChar(kind);
insertInset(new_inset);
// Ok, what happens here if we are unable to insert
// the inset? Leak it?
}
}

View File

@ -1,3 +1,22 @@
2001-09-09 Lars Gullik Bjønnes <larsbj@birdstep.com>
* paragraph.h: make the optional constructor arg required instead.
some modifications to other files because of this.
* minibuffer.C (C_MiniBuffer_peek_event): make it static
* lyxserver.C (C_LyXComm_callback): make it static
* lyx_main.C (error_handler): make it static
* lyx_gui.C (LyX_XErrHandler): make it static
* XFormsView.C (C_XFormsView_atCloseMainFormCB): make it static
* WorkArea.C: make the extern "C" methods static.
* Makefile.am (lyx_LDADD): simplify
2001-09-02 Angus Leeming <a.leeming@ic.ac.uk>
* commandtags.h: removed redundant LFUNs, LFUN_HELP_COPYRIGHT,

View File

@ -166,13 +166,13 @@ bool CutAndPaste::copySelection(Paragraph * startpar, Paragraph * endpar,
// copy more than one paragraph
// clone the paragraphs within the selection
Paragraph * tmppar = startpar;
buf = new Paragraph(*tmppar);
buf = new Paragraph(*tmppar, false);
Paragraph * tmppar2 = buf;
while (tmppar != endpar
&& tmppar->next()) {
tmppar = tmppar->next();
tmppar2->next(new Paragraph(*tmppar));
tmppar2->next(new Paragraph(*tmppar, false));
tmppar2->next()->previous(tmppar2);
tmppar2 = tmppar2->next();
}
@ -209,7 +209,7 @@ bool CutAndPaste::pasteSelection(Paragraph ** par, Paragraph ** endpar,
// There are two cases: cutbuffer only one paragraph or many
if (!buf->next()) {
// only within a paragraph
Paragraph * tmpbuf = new Paragraph(*buf);
Paragraph * tmpbuf = new Paragraph(*buf, false);
// Some provisions should be done here for checking
// if we are inserting at the beginning of a
@ -239,12 +239,12 @@ bool CutAndPaste::pasteSelection(Paragraph ** par, Paragraph ** endpar,
// make a copy of the simple cut_buffer
Paragraph * tmpbuf = buf;
Paragraph * simple_cut_clone = new Paragraph(*tmpbuf);
Paragraph * simple_cut_clone = new Paragraph(*tmpbuf, false);
Paragraph * tmpbuf2 = simple_cut_clone;
while (tmpbuf->next()) {
tmpbuf = tmpbuf->next();
tmpbuf2->next(new Paragraph(*tmpbuf));
tmpbuf2->next(new Paragraph(*tmpbuf, false));
tmpbuf2->next()->previous(tmpbuf2);
tmpbuf2 = tmpbuf2->next();
}

View File

@ -3,17 +3,15 @@ SUBDIRS = mathed insets graphics support frontends
DISTCLEANFILES= *.orig *.rej *~ *.bak core libintl.h config.h
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in $(srcdir)/config.h.in
bin_PROGRAMS = lyx
## libfrontends is given twice on the link line because it needs stuff
## from FRONTEND_GUILIB and inversely. If you do not like it, feel
## free to provide another solution... Maybe signals would solve that
## magically, but I do not understand them much (JMarc)
lyx_DEPENDENCIES = mathed/libmathed.la insets/libinsets.la \
graphics/libgraphics.la \
frontends/libfrontends.la \
support/libsupport.la \
@INCLUDED_SIGC@
lyx_LDADD = $(lyx_DEPENDENCIES) @INTLLIBS@ $(LYX_LIBS) $(SIGC_LIBS) \
$(PSPELL_LIBS) @FRONTEND_LDFLAGS@ @FRONTEND_LIBS@ @AIKSAURUS_LIBS@
lyx_LDADD = $(lyx_DEPENDENCIES) @INTLLIBS@ $(SIGC_LIBS) \
$(PSPELL_LIBS) @AIKSAURUS_LIBS@
#lyx_LDFLAGS=-Wl,-O1
EXTRA_DIST = config.h.in stamp-h.in cheaders ext_l10n.h
ETAGS_ARGS = --lang=c++

View File

@ -45,11 +45,14 @@ void waitForX()
extern "C" {
// Just a bunch of C wrappers around static members of WorkArea
static
void C_WorkArea_scroll_cb(FL_OBJECT * ob, long buf)
{
WorkArea::scroll_cb(ob, buf);
}
static
int C_WorkArea_work_area_handler(FL_OBJECT * ob, int event,
FL_Coord, FL_Coord,
int key, void * xev)
@ -485,7 +488,9 @@ namespace {
string clipboard_selection;
bool clipboard_read = false;
extern "C"
extern "C" {
static
int request_clipboard_cb(FL_OBJECT * /*ob*/, long /*type*/,
void const * data, long size)
{
@ -494,11 +499,14 @@ int request_clipboard_cb(FL_OBJECT * /*ob*/, long /*type*/,
if (size > 0)
clipboard_selection.reserve(size);
for (int i = 0; i < size; ++i)
clipboard_selection += static_cast<char const *>(data)[i];
clipboard_selection +=
static_cast<char const *>(data)[i];
clipboard_read = true;
return 0;
}
}
} // namespace anon
string const WorkArea::getClipboard() const

View File

@ -15,9 +15,6 @@
#pragma implementation
#endif
//#include <sys/time.h>
//#include <unistd.h>
#include "XFormsView.h"
#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
#include "lyxlookup.h"
@ -42,7 +39,15 @@ extern void QuitLyX();
// This is very temporary
BufferView * current_view;
extern "C" int C_XFormsView_atCloseMainFormCB(FL_FORM *, void *);
extern "C" {
static
int C_XFormsView_atCloseMainFormCB(FL_FORM * form, void * p)
{
return XFormsView::atCloseMainFormCB(form, p);
}
}
XFormsView::XFormsView(int width, int height)
@ -87,14 +92,6 @@ int XFormsView::atCloseMainFormCB(FL_FORM *, void *)
}
// Wrapper for the above
extern "C"
int C_XFormsView_atCloseMainFormCB(FL_FORM * form, void * p)
{
return XFormsView::atCloseMainFormCB(form, p);
}
void XFormsView::setPosition(int x, int y)
{
fl_set_form_position(form_, x, y);

View File

@ -41,7 +41,8 @@ void Figure()
/* callbacks for form form_figure */
extern "C"
extern "C" {
void FigureApplyCB(FL_OBJECT *, long)
{
if (!current_view->available())
@ -103,16 +104,17 @@ void FigureApplyCB(FL_OBJECT *, long)
}
extern "C"
void FigureCancelCB(FL_OBJECT *, long)
{
fl_hide_form(fd_form_figure->form_figure);
}
extern "C"
void FigureOKCB(FL_OBJECT * ob, long data)
{
FigureApplyCB(ob, data);
FigureCancelCB(ob, data);
}
}

View File

@ -1,3 +1,8 @@
2001-09-09 Lars Gullik Bjønnes <larsbj@birdstep.com>
* Makefile.am (libgnome_la_LIBADD): depend on the gui libs.
(libgnome_la_SOURCES): sort
2001-08-27 John Levon <moz@compsoc.man.ac.uk>
* GUIRunTime.C: initApplication() should take a int & argc, add debug

View File

@ -1,6 +1,8 @@
AUTOMAKE_OPTIONS = foreign 1.4
DISTCLEANFILES= *.orig *.rej *~ *.bak core
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
ETAGS_ARGS = --lang=c++
noinst_LTLIBRARIES = libgnome.la
BOOST_INCLUDES = -I$(top_srcdir)/boost
INCLUDES = ${FRONTEND_INCLUDES} -I${top_srcdir}/src/ \
@ -9,7 +11,7 @@ INCLUDES = ${FRONTEND_INCLUDES} -I${top_srcdir}/src/ \
-I${top_srcdir}/src/frontends/controllers \
${SIGC_CFLAGS} $(BOOST_INCLUDES)
libgnome_la_OBJADD = \
libgnome_la_LIBADD = \
../xforms/xforms_helpers.lo \
../xforms/Toolbar_pimpl.lo \
../xforms/combox.lo \
@ -19,7 +21,9 @@ libgnome_la_OBJADD = \
../xforms/FormMathsDelim.lo \
../xforms/FormMathsMatrix.lo \
../xforms/FormMathsPanel.lo \
../xforms/FormMathsSpace.lo
../xforms/FormMathsSpace.lo \
@LYX_LIBS@ @FRONTEND_LDFLAGS@ @FRONTEND_LIBS@
# ../xforms/FileDialog.lo \
# ../xforms/FormFiledialog.lo \
# ../xforms/form_filedialog.lo
@ -61,32 +65,32 @@ libgnome_la_OBJADD = \
# ../xforms/RadioButtonGroup.lo \
LIBS=
LDFLAGS= $(libgnome_la_OBJADD)
#LDFLAGS= $(libgnome_la_OBJADD)
LYXDATADIRS =
#ETAGS_ARGS = --lang=c++
libgnome_la_SOURCES = \
gnomeBC.C \
gnomeBC.h \
gnome_helpers.C \
gnome_helpers.h \
mainapp.C \
mainapp.h \
support.c \
support.h \
pixbutton.h \
Dialogs.C \
GnomeBase.C \
GnomeBase.h \
GUIRunTime.C \
FileDialog.C \
FormTabularCreate.C \
FormTabularCreate.h \
FormError.C \
FormError.h \
FormTabularCreate.C \
FormTabularCreate.h \
FormUrl.C \
FormUrl.h \
gnome_helpers.C \
gnome_helpers.h \
GnomeBase.C \
GnomeBase.h \
gnomeBC.C \
gnomeBC.h \
GUIRunTime.C \
pixbutton.h \
mainapp.C \
mainapp.h \
Menubar_pimpl.C \
Menubar_pimpl.h \
support.c \
support.h \
Timeout_pimpl.C \
Timeout_pimpl.h
@ -98,7 +102,6 @@ libgnome_la_SOURCES = \
# GUI_defaults.C \
# GUI_initialize.C \
# GUI_postlyxrc.C \
# GUI_runtime.C \
# GUI_applymenu.C
# just copied from old lyx repository

View File

@ -1,3 +1,8 @@
2001-09-09 Lars Gullik Bjønnes <larsbj@birdstep.com>
* Makefile.am (libqt2_la_LIBADD): rename from OBJADD, depend on
gui libs
2001-09-06 John Levon <moz@compsoc.man.ac.uk>
* ui/QMinipageDialog.ui: fix layout, remove old slot

View File

@ -15,7 +15,7 @@ include Makefile.dialogs
libqt2_la_DEPENDENCIES = ui/libqt2ui.la moc/libqt2moc.la ui/moc/libqt2uimoc.la
libqt2_la_OBJADD = \
libqt2_la_LIBADD = \
ui/libqt2ui.la \
moc/libqt2moc.la \
ui/moc/libqt2uimoc.la \
@ -56,10 +56,11 @@ libqt2_la_OBJADD = \
../xforms/form_url.lo \
../xforms/input_validators.lo \
../xforms/xformsBC.lo \
../xforms/xforms_helpers.lo
../xforms/xforms_helpers.lo \
@LYX_LIBS@ @FRONTEND_LDFLAGS@ @FRONTEND_LIBS@
LIBS=
LDFLAGS= $(libqt2_la_OBJADD)
#LDFLAGS= $(libqt2_la_OBJADD)
ETAGS_ARGS = --lang=c++
libqt2_la_SOURCES = \

View File

@ -56,8 +56,6 @@ QDocument::QDocument(LyXView *, Dialogs *)
void QDocument::build_dialog()
{
int n;
// the tabbed folder
//dialog_.reset(new QDocumentDialog());
@ -119,7 +117,7 @@ void QDocument::build_dialog()
dialog->docFontSizeCO->insertItem( _( "10" ) );
dialog->docFontSizeCO->insertItem( _( "11" ) );
dialog->docFontSizeCO->insertItem( _( "12" ) );
for (n=0; tex_fonts[n][0]; ++n) {
for (int n=0; tex_fonts[n][0]; ++n) {
dialog->docFontsCO->insertItem( tex_fonts[n] );
}
@ -182,7 +180,7 @@ void QDocument::build_dialog()
dialog->tocDepthSB->setRange( -1, 5 );
dialog->secNumDepthSB->setSteps( 1, 1 );
dialog->tocDepthSB->setRange( 1, 1 );
for (n=0; tex_graphics[n][0]; ++n) {
for (int n=0; tex_graphics[n][0]; ++n) {
dialog->postscriptDriverCO->insertItem( tex_graphics[n] );
}

View File

@ -53,3 +53,8 @@ void QThesaurus::replace()
{
controller().replace(dialog_->replaceED->text().latin1());
}
void QThesaurus::apply()
{
}

View File

@ -30,7 +30,7 @@ public:
QThesaurus(ControlThesaurus &);
private:
/// Apply changes
virtual void apply() {};
virtual void apply();
/// update
virtual void update_contents();
/// build the dialog

View File

@ -1,3 +1,20 @@
2001-09-09 Lars Gullik Bjønnes <larsbj@birdstep.com>
* combox.C (C_Combox_input_cb): make it static
(C_Combox_combo_cb): make it static
(C_Combox_peek_event): make it static
* Toolbar_pimpl.C (C_Toolbar_BubbleTimerCB): make it static
(C_Toolbar_BubblePost): make it static
(C_Toolbar_ToolbarCB): make it static
* Timeout_pimpl.C (C_intern_timeout_cb): make it static
* Menubar_pimpl.C (C_Menubar_Pimpl_MenuCallback): make it static
* Makefile.am (libxforms_la_LIBADD): add this and depend on the
gui libs
2001-09-07 Angus Leeming <a.leeming@ic.ac.uk>
* FormBaseDeprecated.[Ch]: use the same allow_resize methodology as has

View File

@ -21,14 +21,12 @@
#include "xformsBC.h"
#include "support/LAssert.h"
extern "C" {
// Callback function invoked by xforms when the dialog is closed by the
// window manager
extern "C" int C_FormBaseWMHideCB(FL_FORM * form, void *);
static int C_FormBaseWMHideCB(FL_FORM * form, void *);
// To trigger an input event when pasting in an xforms input object
// using the middle mouse button.
extern "C" int C_CutandPastePH(FL_OBJECT *, int, FL_Coord, FL_Coord,
int, void *);
}
FormBase::FormBase(ControlButtons & c, string const & t, bool allowResize)
@ -123,7 +121,9 @@ FormBase * GetForm(FL_OBJECT * ob)
} // namespace anon
extern "C"
extern "C" {
static
int C_FormBaseWMHideCB(FL_FORM * form, void *)
{
// Close the dialog cleanly, even if the WM is used to do so.
@ -134,32 +134,32 @@ int C_FormBaseWMHideCB(FL_FORM * form, void *)
}
extern "C" void C_FormBaseApplyCB(FL_OBJECT * ob, long)
void C_FormBaseApplyCB(FL_OBJECT * ob, long)
{
GetForm(ob)->ApplyButton();
}
extern "C" void C_FormBaseOKCB(FL_OBJECT * ob, long)
void C_FormBaseOKCB(FL_OBJECT * ob, long)
{
GetForm(ob)->OKButton();
}
extern "C" void C_FormBaseCancelCB(FL_OBJECT * ob, long)
void C_FormBaseCancelCB(FL_OBJECT * ob, long)
{
FormBase * form = GetForm(ob);
form->CancelButton();
}
extern "C" void C_FormBaseRestoreCB(FL_OBJECT * ob, long)
void C_FormBaseRestoreCB(FL_OBJECT * ob, long)
{
GetForm(ob)->RestoreButton();
}
extern "C" void C_FormBaseInputCB(FL_OBJECT * ob, long d)
void C_FormBaseInputCB(FL_OBJECT * ob, long d)
{
GetForm(ob)->InputCB(ob, d);
}
@ -167,12 +167,14 @@ extern "C" void C_FormBaseInputCB(FL_OBJECT * ob, long d)
// To trigger an input event when pasting in an xforms input object
// using the middle mouse button.
extern "C" int C_CutandPastePH(FL_OBJECT * ob, int event,
int C_CutandPastePH(FL_OBJECT * ob, int event,
FL_Coord, FL_Coord, int key, void *)
{
if ((event == FL_PUSH) && (key == 2) && (ob->objclass == FL_INPUT)) {
if ((event == FL_PUSH) && (key == 2)
&& (ob->objclass == FL_INPUT)) {
C_FormBaseInputCB(ob, 0);
}
return 0;
}
}

View File

@ -26,30 +26,39 @@
using SigC::slot;
extern "C" int C_FormBaseDeprecatedWMHideCB(FL_FORM * ob, void * d)
extern "C" {
static
int C_FormBaseDeprecatedWMHideCB(FL_FORM * ob, void * d)
{
return FormBaseDeprecated::WMHideCB(ob, d);
}
extern "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT * ob, long d)
void C_FormBaseDeprecatedApplyCB(FL_OBJECT * ob, long d)
{
FormBaseDeprecated::ApplyCB(ob, d);
}
extern "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT * ob, long d)
void C_FormBaseDeprecatedOKCB(FL_OBJECT * ob, long d)
{
FormBaseDeprecated::OKCB(ob, d);
}
extern "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT * ob, long d)
void C_FormBaseDeprecatedCancelCB(FL_OBJECT * ob, long d)
{
FormBaseDeprecated::CancelCB(ob, d);
}
extern "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT * ob, long d)
void C_FormBaseDeprecatedInputCB(FL_OBJECT * ob, long d)
{
FormBaseDeprecated::InputCB(ob, d);
}
extern "C" void C_FormBaseDeprecatedRestoreCB(FL_OBJECT * ob, long d)
void C_FormBaseDeprecatedRestoreCB(FL_OBJECT * ob, long d)
{
FormBaseDeprecated::RestoreCB(ob, d);
}
}
FormBaseDeprecated::FormBaseDeprecated(LyXView * lv, Dialogs * d,

View File

@ -79,6 +79,28 @@ long const SIX_MONTH_SEC = 6L * 30L * 24L * 60L * 60L;
//static
long const ONE_HOUR_SEC = 60L * 60L;
extern "C" {
static
int C_LyXFileDlg_CancelCB(FL_FORM *fl, void *xev)
{
return FileDialog::Private::CancelCB(fl, xev);
}
static
void C_LyXFileDlg_DoubleClickCB(FL_OBJECT * ob, long data)
{
FileDialog::Private::DoubleClickCB(ob, data);
}
static
void C_LyXFileDlg_FileDlgCB(FL_OBJECT * ob, long data)
{
FileDialog::Private::FileDlgCB(ob, data);
}
}
} // namespace anon
@ -545,12 +567,6 @@ void FileDialog::Private::FileDlgCB(FL_OBJECT *, long lArgument)
}
extern "C" void C_LyXFileDlg_FileDlgCB(FL_OBJECT * ob, long data)
{
FileDialog::Private::FileDlgCB(ob, data);
}
// Handle callback from list
void FileDialog::Private::HandleListHit()
{
@ -573,12 +589,6 @@ void FileDialog::Private::DoubleClickCB(FL_OBJECT *, long)
}
extern "C" void C_LyXFileDlg_DoubleClickCB(FL_OBJECT * ob, long data)
{
FileDialog::Private::DoubleClickCB(ob, data);
}
// Handle double click from list
bool FileDialog::Private::HandleDoubleClick()
{
@ -678,12 +688,6 @@ int FileDialog::Private::CancelCB(FL_FORM *, void *)
}
extern "C" int C_LyXFileDlg_CancelCB(FL_FORM *fl, void *xev)
{
return FileDialog::Private::CancelCB(fl, xev);
}
// Simulates a click on OK/Cancel
void FileDialog::Private::Force(bool cancel)
{

View File

@ -37,12 +37,15 @@ public:
string pszLsEntry;
};
extern "C" void C_LyXFileDlg_FileDlgCB(FL_OBJECT * ob, long data);
extern "C" void C_LyXFileDlg_DoubleClickCB(FL_OBJECT * ob, long data);
extern "C" int C_LyXFileDlg_CancelCB(FL_FORM *fl, void *xev);
class FileDialog::Private : public SigC::Object
{
//extern "C" {
// void C_LyXFileDlg_FileDlgCB(FL_OBJECT * ob, long data);
// void C_LyXFileDlg_DoubleClickCB(FL_OBJECT * ob, long data);
// int C_LyXFileDlg_CancelCB(FL_FORM *fl, void *xev);
//}
class FileDialog::Private : public SigC::Object {
public:
///
Private();

View File

@ -29,7 +29,7 @@ FormFloat::FormFloat(ControlFloat & c)
{}
#warning Needs to be implemented. (Lgb)
// FIX: Needs to be implemented. (Lgb)
// A way to set to float default is missing.
// A way to set "force[!]" is missing.
// Also there are two groups of buttons [Here] and [top,bottom,page,here],

View File

@ -31,16 +31,22 @@ using std::strlen;
static char h_align_str[80] = "c";
static char v_align_c[] = "tcb";
extern "C"
extern "C" {
static
int C_FormMathsMatrixAlignFilter(FL_OBJECT * ob, char const *,
char const * cur, int c)
{
lyx::Assert(ob);
FormMathsMatrix * pre = static_cast<FormMathsMatrix *>(ob->u_vdata);
FormMathsMatrix * pre =
static_cast<FormMathsMatrix *>(ob->u_vdata);
lyx::Assert(pre);
return pre->AlignFilter(cur, c);
}
}
FormMathsMatrix::FormMathsMatrix(LyXView * lv, Dialogs * d,
FormMathsPanel const & p)

View File

@ -240,7 +240,7 @@ void FormParagraph::apply()
labelwidthstring = fl_get_input(dialog_->input_labelwidth);
noindent = fl_get_button(dialog_->check_noindent);
Spacing::Space linespacing;
Spacing::Space linespacing = Spacing::Default;
string other_linespacing;
switch (fl_get_choice(dialog_->choice_linespacing)) {
case 1: linespacing = Spacing::Default; break;

View File

@ -3005,13 +3005,20 @@ void FormPreferences::browse(FL_OBJECT * inpt,
// C function wrapper, required by xforms.
extern "C" int C_FormPreferencesFeedbackCB(FL_OBJECT * ob, int event,
extern "C" {
static
int C_FormPreferencesFeedbackCB(FL_OBJECT * ob, int event,
FL_Coord mx, FL_Coord my,
int key, void * xev)
{
return FormPreferences::FeedbackCB(ob, event, mx, my, key, xev);
return FormPreferences::FeedbackCB(ob, event,
mx, my, key, xev);
}
}
int FormPreferences::FeedbackCB(FL_OBJECT * ob, int event,
FL_Coord, FL_Coord, int, void *)
{

View File

@ -21,7 +21,9 @@
#include "form_splash.h"
#include "support/LAssert.h"
extern "C"
extern "C" {
static
int C_FormSplashCloseCB(FL_FORM * form, void *)
{
lyx::Assert(form && form->u_vdata);
@ -30,8 +32,6 @@ int C_FormSplashCloseCB(FL_FORM * form, void *)
return FL_CANCEL;
}
extern "C"
void C_FormSplashCB(FL_OBJECT * ob, long)
{
lyx::Assert(ob && ob->form && ob->form->u_vdata);
@ -39,6 +39,8 @@ void C_FormSplashCB(FL_OBJECT * ob, long)
pre->Hide();
}
}
FormSplash::FormSplash(ControlSplash & c)
: ViewSplash(c)

View File

@ -194,6 +194,8 @@ libxforms_la_SOURCES = \
# GUI_runtime.C \
# GUI_applymenu.C
libxforms_la_LIBADD = @LYX_LIBS@ @FRONTEND_LDFLAGS@ @FRONTEND_LIBS@
# for convenience only
updatesrc:
$(MAKE) -C forms updatesrc

View File

@ -70,9 +70,16 @@ int string_width(string const & str)
} // namespace anon
extern "C" {
//Defined later, used in makeMenubar().
extern "C"
void C_Menubar_Pimpl_MenuCallback(FL_OBJECT * ob, long button);
static
void C_Menubar_Pimpl_MenuCallback(FL_OBJECT * ob, long button)
{
Menubar::Pimpl::MenuCallback(ob, button);
}
}
Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mb)
@ -523,13 +530,6 @@ int Menubar::Pimpl::create_submenu(Window win, LyXView * view,
}
extern "C"
void C_Menubar_Pimpl_MenuCallback(FL_OBJECT * ob, long button)
{
Menubar::Pimpl::MenuCallback(ob, button);
}
void Menubar::Pimpl::MenuCallback(FL_OBJECT * ob, long button)
{
ItemInfo * iteminfo = static_cast<ItemInfo *>(ob->u_vdata);

View File

@ -22,13 +22,17 @@ using std::endl;
namespace {
extern "C"
extern "C" {
static
void C_intern_timeout_cb(int, void * data)
{
Timeout * to = static_cast<Timeout *>(data);
to->emit();
}
}
} // namespace anon

View File

@ -106,7 +106,9 @@ void BubbleTimerCB(FL_OBJECT *, long data)
}
extern "C" void C_Toolbar_BubbleTimerCB(FL_OBJECT * ob, long data)
extern "C"
static
void C_Toolbar_BubbleTimerCB(FL_OBJECT * ob, long data)
{
BubbleTimerCB(ob, data);
}
@ -134,7 +136,9 @@ int BubblePost(FL_OBJECT *ob, int event,
}
extern "C" int C_Toolbar_BubblePost(FL_OBJECT * ob, int event,
extern "C"
static
int C_Toolbar_BubblePost(FL_OBJECT * ob, int event,
FL_Coord /*mx*/, FL_Coord /*my*/,
int key, void * xev)
{
@ -292,16 +296,17 @@ void ToolbarCB(FL_OBJECT * ob, long ac)
<< res << endl;
}
} // namespace anon
extern "C" {
extern "C" void C_Toolbar_ToolbarCB(FL_OBJECT * ob, long data)
static
void C_Toolbar_ToolbarCB(FL_OBJECT * ob, long data)
{
ToolbarCB(ob, data);
}
}
namespace {
void setPixmap(FL_OBJECT * obj, int action, int buttonwidth, int height) {
string name, arg, xpm_name;

View File

@ -43,9 +43,28 @@ using std::endl;
// These are C wrappers around static members of Combox, used as
// callbacks for xforms.
extern "C" void C_Combox_input_cb(FL_OBJECT *ob, long);
extern "C" void C_Combox_combo_cb(FL_OBJECT *ob, long data) ;
extern "C" int C_Combox_peek_event(FL_FORM * form, void *xev);
extern "C" {
static
void C_Combox_input_cb(FL_OBJECT * ob, long data)
{
Combox::input_cb(ob, data);
}
static
void C_Combox_combo_cb(FL_OBJECT * ob, long data)
{
Combox::combo_cb(ob, data);
}
static
int C_Combox_peek_event(FL_FORM * form, void *xev)
{
return Combox::peek_event(form, xev);
}
}
Combox::Combox(combox_type t)
: type(t), tabfolder1(0), tabfolder2(0)
@ -364,12 +383,6 @@ void Combox::input_cb(FL_OBJECT * ob, long)
}
extern "C" void C_Combox_input_cb(FL_OBJECT * ob, long data)
{
Combox::input_cb(ob, data);
}
void Combox::combo_cb(FL_OBJECT * ob, long data)
{
Combox * combo = static_cast<Combox*>(ob->u_vdata);
@ -404,11 +417,6 @@ void Combox::combo_cb(FL_OBJECT * ob, long data)
}
}
extern "C" void C_Combox_combo_cb(FL_OBJECT * ob, long data)
{
Combox::combo_cb(ob, data);
}
int Combox::peek_event(FL_FORM * form, void * xev)
{
@ -475,11 +483,6 @@ int Combox::peek_event(FL_FORM * form, void * xev)
return 0;
}
extern "C" int C_Combox_peek_event(FL_FORM * form, void *xev)
{
return Combox::peek_event(form, xev);
}
#ifdef TESTCOMBO
typedef struct {

View File

@ -38,9 +38,8 @@ void setEnabled(FL_OBJECT * ob, bool enable)
// Take a string and add breaks so that it fits into a desired label width, w
string formatted(string const & sin, int w, int size, int style)
{
#ifdef WITH_WARNINGS
#warning Why cant this be done by a one pass algo? (Lgb)
#endif
// FIX: Q: Why cant this be done by a one pass algo? (Lgb)
string sout;
if (sin.empty()) return sout;

View File

@ -61,9 +61,7 @@ ImageLoaderXPM::runImageLoader(string const & filename)
Display * display = GUIRunTime::x11Display();
//(BE 2000-08-05)
#ifdef WITH_WARNINGS
#warning This might be a dirty thing, but I dont know any other solution.
#endif
// This might be a dirty thing, but I dont know any other solution.
Screen * screen = ScreenOfDisplay(display, GUIRunTime::x11Screen());
Pixmap pixmap;

View File

@ -177,7 +177,9 @@ void kill_gs(int pid, int sig)
}
extern "C"
extern "C" {
static
int GhostscriptMsg(XEvent * ev, void *)
{
// bin all events not of interest
@ -313,6 +315,8 @@ int GhostscriptMsg(XEvent * ev, void *)
return FL_PREEMPT;
}
}
void AllocColors(int num)
// allocate color cube numxnumxnum, if possible
@ -388,6 +392,7 @@ void AllocGrays(int num)
gs_color = true;
}
void InitFigures()
{
// if bitmaps and figures are not empty we will leak mem

View File

@ -631,6 +631,8 @@ bool InsetCollapsable::searchForward(BufferView * bv, string const & str,
first_after_edit = false;
return found;
}
bool InsetCollapsable::searchBackward(BufferView * bv, string const & str,
bool const & cs, bool const & mw)
{
@ -642,9 +644,10 @@ bool InsetCollapsable::searchBackward(BufferView * bv, string const & str,
}
string const InsetCollapsable::selectNextWord(BufferView * bv, float & value) const
string const InsetCollapsable::selectNextWord(BufferView * bv,
float & value) const
{
string str = inset.selectNextWord(bv, value);
string const str = inset.selectNextWord(bv, value);
if (first_after_edit && str.empty())
close(bv);
first_after_edit = false;

View File

@ -423,8 +423,7 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
inset_y = cy(bv) + drawTextYOffset;
}
if (!cleared && (need_update == CURSOR)
&& !getLyXText(bv)->selection.set())
{
&& !getLyXText(bv)->selection.set()) {
drawFrame(pain, cleared);
x += last_width; // was width(bv, f);
need_update = NONE;
@ -470,9 +469,9 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
bv->screen()->update(lt, bv, y_offset, int(x));
} else {
locked = false;
if (need_update & SELECTION)
if (need_update & SELECTION) {
bv->screen()->toggleToggle(lt, bv, y_offset, int(x));
else if (need_update & CURSOR) {
} else if (need_update & CURSOR) {
bv->screen()->toggleSelection(lt, bv, true, y_offset,int(x));
lt->clearSelection();
lt->selection.cursor = lt->cursor;
@ -484,15 +483,20 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
lt->refresh_y = 0;
lt->status(bv, LyXText::UNCHANGED);
if ((need_update != CURSOR_PAR) &&
((drawFrame_ == ALWAYS) || ((drawFrame_ == LOCKED) && locked)))
((drawFrame_ == ALWAYS) || ((drawFrame_ == LOCKED) && locked))) {
drawFrame(pain, cleared);
else if (need_update & CLEAR_FRAME)
} else if (need_update & CLEAR_FRAME) {
clearFrame(pain, cleared);
}
x += last_width /* was width(bv, f) */ - TEXT_TO_INSET_OFFSET;
if (bv->text->status() == LyXText::CHANGED_IN_DRAW) {
need_update |= FULL;
} else if (need_update != INIT)
} else if (need_update != INIT) {
need_update = NONE;
}
if (clear)
lt = 0;
}
@ -506,7 +510,8 @@ void InsetText::drawFrame(Painter & pain, bool cleared) const
frame_y = top_baseline - insetAscent + ttoD2;
frame_w = last_width - TEXT_TO_INSET_OFFSET;
frame_h = insetAscent + insetDescent - TEXT_TO_INSET_OFFSET;
pain.rectangle(frame_x, frame_y, frame_w, frame_h,
pain.rectangle(frame_x, frame_y,
frame_w, frame_h,
frame_color);
frame_is_visible = true;
}

View File

@ -75,7 +75,9 @@ FL_resource res[] =
};
extern "C"
extern "C" {
static
int LyX_XErrHandler(Display * display, XErrorEvent * xeev)
{
// emergency save
@ -91,6 +93,8 @@ int LyX_XErrHandler(Display * display, XErrorEvent * xeev)
return 0; // Solaris CC wants us to return something
}
}
LyXGUI::LyXGUI(LyX * owner, int * argc, char * argv[], bool GUI)
: _owner(owner), lyxViews(0)

View File

@ -40,11 +40,15 @@ extern FD_form_sendto * fd_form_sendto;
extern void HideFiguresPopups();
// Prevents LyX from being killed when the close box is pressed in a popup.
extern "C" int CancelCloseBoxCB(FL_FORM *, void *)
extern "C"
int CancelCloseBoxCB(FL_FORM *, void *)
{
return FL_CANCEL;
}
// Redraw the form (on receipt of a Signal indicating, for example,
// that the xform colors have been re-mapped).
void RedrawAllBufferRelatedDialogs()

View File

@ -23,7 +23,8 @@
#include <utility> /* needed for pair<> definition */
/// Prevents LyX from being killed when the close box is pressed in a popup.
extern "C" int CancelCloseBoxCB(FL_FORM *, void *);
extern "C"
int CancelCloseBoxCB(FL_FORM *, void *);
/** Redraw the form (on receipt of a Signal indicating, for example,
that the xform colors have been re-mapped). */

View File

@ -185,7 +185,52 @@ LyX::~LyX()
}
extern "C" void error_handler(int err_sig);
extern "C" {
static
void error_handler(int err_sig)
{
switch (err_sig) {
case SIGHUP:
lyxerr << "\nlyx: SIGHUP signal caught" << endl;
break;
case SIGINT:
// no comments
break;
case SIGFPE:
lyxerr << "\nlyx: SIGFPE signal caught" << endl;
break;
case SIGSEGV:
lyxerr << "\nlyx: SIGSEGV signal caught" << endl;
lyxerr <<
"Sorry, you have found a bug in LyX."
" If possible, please read 'Known bugs'\n"
"under the Help menu and then send us "
"a full bug report. Thanks!" << endl;
break;
case SIGTERM:
// no comments
break;
}
// Deinstall the signal handlers
signal(SIGHUP, SIG_DFL);
signal(SIGINT, SIG_DFL);
signal(SIGFPE, SIG_DFL);
signal(SIGSEGV, SIG_DFL);
signal(SIGTERM, SIG_DFL);
bufferlist.emergencyWriteAll();
lyxerr << "Bye." << endl;
if (err_sig!= SIGHUP &&
(!GetEnv("LYXDEBUG").empty() || err_sig == SIGSEGV))
lyx::abort();
exit(0);
}
}
void LyX::init(bool gui)
{
@ -839,44 +884,3 @@ bool LyX::easyParse(int * argc, char * argv[])
}
extern "C"
void error_handler(int err_sig)
{
switch (err_sig) {
case SIGHUP:
lyxerr << "\nlyx: SIGHUP signal caught" << endl;
break;
case SIGINT:
// no comments
break;
case SIGFPE:
lyxerr << "\nlyx: SIGFPE signal caught" << endl;
break;
case SIGSEGV:
lyxerr << "\nlyx: SIGSEGV signal caught" << endl;
lyxerr <<
"Sorry, you have found a bug in LyX."
" If possible, please read 'Known bugs'\n"
"under the Help menu and then send us "
"a full bug report. Thanks!" << endl;
break;
case SIGTERM:
// no comments
break;
}
// Deinstall the signal handlers
signal(SIGHUP, SIG_DFL);
signal(SIGINT, SIG_DFL);
signal(SIGFPE, SIG_DFL);
signal(SIGSEGV, SIG_DFL);
signal(SIGTERM, SIG_DFL);
bufferlist.emergencyWriteAll();
lyxerr << "Bye." << endl;
if (err_sig!= SIGHUP &&
(!GetEnv("LYXDEBUG").empty() || err_sig == SIGSEGV))
lyx::abort();
exit(0);
}

View File

@ -1195,7 +1195,7 @@ string const LyXFunc::dispatch(int ac,
break;
#else
#ifdef WITH_WARNINGS
#warning Find another implementation here (or another lyxfunc)!
//#warning Find another implementation here (or another lyxfunc)!
#endif
#endif
case LFUN_HELP_ABOUTLYX:

View File

@ -36,7 +36,6 @@
#include <config.h>
//#include <cstring>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
@ -81,14 +80,24 @@ int mkfifo(char const * __path, mode_t __mode) {
extern LyXAction lyxaction;
extern "C" {
// C wrapper
extern "C" void C_LyXComm_callback(int fd, void *v);
static
void C_LyXComm_callback(int fd, void *v)
{
LyXComm::callback(fd, v);
}
}
// LyXComm class
// Open pipes
void LyXComm::openConnection() {
void LyXComm::openConnection()
{
lyxerr[Debug::LYXSERVER] << "LyXComm: Opening connection" << endl;
// If we are up, that's an error
@ -113,10 +122,11 @@ void LyXComm::openConnection() {
// The current emx implementation of access() won't work with pipes.
rc = DosCreateNPipe(tmp.c_str(), &fd, NP_ACCESS_INBOUND,
NP_NOWAIT|0x01, 0600, 0600, 0);
if (rc == ERROR_PIPE_BUSY) {
if (rc == ERROR_PIPE_BUSY)
#else
if (::access(tmp.c_str(), F_OK) == 0) {
if (::access(tmp.c_str(), F_OK) == 0)
#endif
{
lyxerr << "LyXComm: Pipe " << tmp << " already exists.\n"
<< "If no other LyX program is active, please delete"
" the pipe by hand and try again." << endl;
@ -161,13 +171,14 @@ void LyXComm::openConnection() {
tmp = pipename + ".out";
#ifndef __EMX__
if (::access(tmp.c_str(), F_OK) == 0) {
if (::access(tmp.c_str(), F_OK) == 0)
#else
rc = DosCreateNPipe(tmp.c_str(), &fd, NP_ACCESS_DUPLEX,
NP_NOWAIT|0x01, 0600, 0600, 0);
if (rc == ERROR_PIPE_BUSY) {
if (rc == ERROR_PIPE_BUSY)
#endif
{
lyxerr << "LyXComm: Pipe " << tmp << " already exists.\n"
<< "If no other LyX program is active, please delete"
" the pipe by hand and try again." << endl;
@ -216,14 +227,16 @@ void LyXComm::openConnection() {
lyxerr << "LyXComm: Could not set flags on pipe " << tmp
<< '\n' << strerror(errno) << endl;
return;
};
}
// We made it!
ready = true;
lyxerr[Debug::LYXSERVER] << "LyXComm: Connection established" << endl;
}
/// Close pipes
void LyXComm::closeConnection() {
void LyXComm::closeConnection()
{
#ifdef __EMX__
APIRET rc;
int errnum;
@ -288,6 +301,7 @@ void LyXComm::closeConnection() {
ready = false;
}
// Receives messages and sends then to client
void LyXComm::callback(int fd, void *v)
{
@ -353,13 +367,9 @@ void LyXComm::callback(int fd, void *v)
errno= 0;
}
extern "C" void C_LyXComm_callback(int fd, void *v)
void LyXComm::send(string const & msg)
{
LyXComm::callback(fd, v);
}
void LyXComm::send(string const & msg) {
if (msg.empty()) {
lyxerr << "LyXComm: Request to send empty string. Ignoring."
<< endl;

View File

@ -7,8 +7,6 @@ ETAGS_ARGS = --lang=c++
BOOST_INCLUDES = -I$(top_srcdir)/boost
INCLUDES = -I${srcdir}/../ $(SIGC_CFLAGS) $(BOOST_INCLUDES)
libmathed_la_SOURCES = \
array.C \
array.h \

View File

@ -112,9 +112,7 @@ MathArrayInset * matrixpar(int & idx)
InsetFormulaBase::InsetFormulaBase()
{
#ifdef WITH_WARNINGS
#warning This is needed as long the math parser is not re-entrant
#endif
// This is needed as long the math parser is not re-entrant
MathMacroTable::builtinMacros();
//lyxerr << "sizeof MathInset: " << sizeof(MathInset) << "\n";
}

View File

@ -233,7 +233,9 @@ int MiniBuffer::peek_event(FL_OBJECT * ob, int event, int key)
}
extern "C"
extern "C" {
static
int C_MiniBuffer_peek_event(FL_OBJECT * ob, int event,
FL_Coord, FL_Coord,
int key, void * /*xev*/)
@ -242,6 +244,8 @@ int C_MiniBuffer_peek_event(FL_OBJECT * ob, int event,
return mini->peek_event(ob, event, key);
}
}
void MiniBuffer::prepare()
{

View File

@ -16,7 +16,10 @@
#if defined (__cplusplus)
#include <cctype>
#include <cstdlib>
extern "C" inline int readlink(const char *, char *, size_t) {return -1;}
extern "C"
inline int readlink(const char *, char *, size_t) {return -1;}
#else
#include <ctype.h>
#include <stdlib.h>

View File

@ -1606,9 +1606,9 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
}
#else
#ifdef WITH_WARNINGS
#warning For now we ALWAYS have to close the foreign font settings if they are
#warning there as we start another \selectlanguage with the next paragraph if
#warning we are in need of this. This should be fixed sometime (Jug)
//#warning For now we ALWAYS have to close the foreign font settings if they are
//#warning there as we start another \selectlanguage with the next paragraph if
//#warning we are in need of this. This should be fixed sometime (Jug)
#endif
running_font.latexWriteEndChanges(os, basefont, basefont);
#endif

View File

@ -94,7 +94,7 @@ public:
explicit
Paragraph(Paragraph * par);
///
Paragraph(Paragraph const &, bool same_ids = false);
Paragraph(Paragraph const &, bool same_ids);
/// the destructor removes the new paragraph from the list
~Paragraph();
@ -400,6 +400,8 @@ public:
inset_iterator InsetIterator(size_type pos);
private:
/// if anything uses this we don't want it to.
Paragraph(Paragraph const &);
///
Paragraph * next_;
///

View File

@ -129,7 +129,7 @@ inline
void l_getline(istream & is, string & str)
{
#ifdef WITH_WARNINGS
#warning old l_getline
//#warning old l_getline
#endif
getline(is, str);
while(str.empty())

View File

@ -2281,6 +2281,7 @@ string const LyXText::selectNextWord(BufferView * bview,
return str;
}
#warning Dekel please have a look on this one RTL? (Jug)
#warning DEKEL!
// we have to go on checking so move cusor to the right
if (cursor.pos() == cursor.par()->size()) {
if (!cursor.par()->next())

View File

@ -2202,8 +2202,8 @@ void LyXText::setCursorIntern(BufferView * bview, Paragraph * par,
// and open and lock the inset (bla bla bla)
// stuff I don't know... so can you have a look?
// (Lgb)
// I moved the lyxerr stuff in here so we can see if this
// is actually really needed and where!
// I moved the lyxerr stuff in here so we can see if
// this is actually really needed and where!
// (Jug)
it->getLyXText(bview)->setCursorIntern(bview, par, pos, setfont,
boundary);

View File

@ -253,7 +253,7 @@ int Trans::Load(LyXLex & lex)
return -1;
#if 1
#warning This code should be removed...
//#warning This code should be removed...
// But we need to fix up all the kmap files first
// so that this field is not present anymore.
if (lex.next(true)) {

View File

@ -296,7 +296,7 @@ Undo * createUndo(BufferView * bv, Undo::undo_kind kind,
while (tmppar != end && tmppar->next()) {
tmppar = tmppar->next();
tmppar2->next(new Paragraph(*tmppar));
tmppar2->next(new Paragraph(*tmppar, false));
tmppar2->next()->id(tmppar->id());
// a memory optimization: Just store the layout
// information when only edit