]> git.lyx.org Git - lyx.git/commitdiff
comment out the fax stuff, diable LyXLookup completely when xforms 0.89, fix some...
authorLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 2 Nov 2000 04:48:34 +0000 (04:48 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 2 Nov 2000 04:48:34 +0000 (04:48 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1181 a592a061-630c-0410-9148-cb99ea01b6c8

25 files changed:
ChangeLog
config/lyxinclude.m4
po/POTFILES.in
sigc++/thread.cc
sigc++/thread.h
src/LyXAction.C
src/LyXView.C
src/Makefile.am
src/WorkArea.C
src/commandtags.h
src/lyx_cb.C
src/lyx_gui.C
src/lyxfunc.C
src/lyxlookup.C
src/lyxlookup.h
src/lyxrc.C
src/lyxrc.h
src/mathed/formula.C
src/mathed/math_panel.C
src/mathed/math_parser.C
src/paragraph.C
src/support/atoi.C
src/support/filetools.C
src/support/fmt.C
src/trans.C

index 7ad3e90ec9fb459b3380b1e3470c0a44d17f94de..d6c9d2746c888f2586a7858896a4c27df4a2e711 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,43 @@
+2000-11-02  Lars Gullik Bjønnes  <larsbj@lyx.org>
+
+       * src/lyxlookup.C: include FORMS_H_LOCATION to get at FL_REVISION,
+       conditionalize build on xforms < 0.89
+
+       * src/lyx_gui.C (LyXGUI): only close lyxlookup if not xforms 0.89
+
+       * src/lyxfunc.C (getStatus): commenout LFUN_FAX
+
+       * src/LyXAction.C (init): comment out fax
+
+       * src/lyxrc.h: comment out the fax enums
+       comment out the fax variables
+
+       * src/commandtags.h: comment out LFUN_FAX
+
+       * src/lyxrc.C: disable fax variables.
+       (read): disable parsing of fax variables
+       (output): disable writing of fax variables
+       (getFeedback): now description for fax variables
+
+       * src/lyxfunc.C: comment out MenuFax
+       (Dispatch): disable LFUN_FAX
+
+       * src/lyx_cb.C (MenuFax): comment out
+
+       * src/WorkArea.C: add <cctype>
+       (work_area_handler): better key handling, should be ok now.
+       for accented chars + etc
+
+       * src/Makefile.am (lyx_SOURCES): remove lyx_sendfax.C
+       lyx_sendfax.h and lyx_sendfax_man.C
+
+       * src/LyXView.C: don't include lyxlookup.h when using xforms 0.89
+       (show): don't call InitLyXLookup when using xforms 0.89
+
 2000-11-01  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
+       * src/trans.C (AddDeadkey): better fix, the other one could crash...
+
        * src/support/filetools.C (GetFileContents): close to dummy change
 
 2000-10-31  Lars Gullik Bjønnes  <larsbj@lyx.org>
index 10e263f3481993c0cc0cc8e570dc5361e86153c3..b6114f13d2ea67b20614a80244dbf481efd48517 100644 (file)
@@ -187,7 +187,7 @@ dnl Check the version of g++
       2.95.1)  CXXFLAGS="-g $lyx_opt -fpermissive -fno-rtti -fno-exceptions";;
       2.95.*)  CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
       2.96*)  CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
-      2.97*)   CXXFLAGS="-g $lyx_opt -fhonor-std";;
+      2.97*)   CXXFLAGS="-g $lyx_opt -fhonor-std -fno-builtin -ffunction-sectons -fdata-sections";;
       *2.91.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
       *)       CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
     esac
index 814cab19bf47c432c1294784accaf974ec644f3f..cfcf30161702ce831e6a246162c5ebeb468f4f14 100644 (file)
@@ -121,6 +121,7 @@ src/lyxfunc.C
 src/lyx_gui.C
 src/lyx_gui_misc.C
 src/lyx_main.C
+src/lyxrc.C
 src/lyx_sendfax.C
 src/lyx_sendfax_main.C
 src/LyXSendto.C
index 43ad7c14ed226e70a7d1cf0145471087ea2a7059..d9b0d4d2009479b645799697243d13f719436f07 100644 (file)
@@ -53,7 +53,7 @@ Condition::~Condition()
 int Condition::signal()       {return pthread_cond_signal(&cond_);}
 int Condition::broadcast()    {return pthread_cond_broadcast(&cond_);}
 int Condition::wait(Mutex &m) {return pthread_cond_wait(&cond_,m);}
-int Condition::wait(Mutex &m,struct timespec* spec)
+int Condition::wait(Mutex &m, struct timespec* spec)
   {return pthread_cond_timedwait(&cond_,m,spec);}
 int Condition::destroy()      {return pthread_cond_destroy(&cond_);}
 
index ae9696a654e38f9d10b9aa7c39c97470c9b3b399..188738c60d88303fb1998c5fd732e1c58bd47504 100644 (file)
@@ -121,7 +121,7 @@ struct Condition
 
      // unlocks a mutex while waiting on a condition, then reaquires lock
      // with a fixed maximum duration.
-     int wait(Mutex &m,struct timespec* spec);
+     int wait(Mutex &m, struct timespec* spec);
 
   };
 
index 9d7c99e2b356d1ab067dbc463f4ec17e6c5d8e4d..d89f4ffd39000c1f2ce300e4c15c59f57b3810c1 100644 (file)
@@ -126,7 +126,9 @@ void LyXAction::init()
                { LFUN_ENDBUFSEL, "buffer-end-select",
                  N_("Select to end of document"), ReadOnly },
                { LFUN_EXPORT, "buffer-export", N_("Export to"), ReadOnly },
+#if 0
                { LFUN_FAX, "buffer-fax", N_("Fax"), ReadOnly },
+#endif
 #ifndef NEW_INSETS
                { LFUN_INSERTFOOTNOTE, "buffer-float-insert", "", Noop },
 #endif
index 100eb409d634ad0b1a9275c8ee8fff3d8459d6fb..292a2581a577802aff21d714112f4fa7aab28255 100644 (file)
@@ -19,7 +19,9 @@
 
 #include "LyXView.h"
 #include "lyx_main.h"
+#if FL_REVISION < 89
 #include "lyxlookup.h"
+#endif
 #include "minibuffer.h"
 #include "lyxfunc.h"
 #include "debug.h"
@@ -210,7 +212,9 @@ void LyXView::show(int place, int border, string const & title)
 {
        fl_show_form(form_, place, border, title.c_str());
        minibuffer->Init();
+#if FL_REVISION < 89
        InitLyXLookup(fl_get_display(), form_->window);
+#endif
 }
 
 
index cca044c27eccafff6c147bea489f35ac32817d1d..6aa24829699674bdeb04e014d0ec1b9fa1a7013a 100644 (file)
@@ -154,9 +154,6 @@ lyx_SOURCES = \
        lyx_gui_misc.h \
        lyx_main.C \
        lyx_main.h \
-       lyx_sendfax.C \
-       lyx_sendfax.h \
-       lyx_sendfax_main.C \
        lyx_sty.C \
        lyx_sty.h \
        lyxcursor.C \
index 0821f000f48e4698d0fa2f264f7aad4bc127a10a..85268e6d23e0aae9716e19bfc38615b03cd47323 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <config.h>
 #include <cmath>
-
+#include <cctype>
 #ifdef __GNUG__
 #pragma implementation
 #endif
@@ -377,7 +377,13 @@ int WorkArea::work_area_handler(FL_OBJECT * ob, int event,
                        else
                                break;
                } else {
-                       ret_key = (keysym ? keysym : key);
+                       // It seems that this was a bit optimistic...
+                       // With this hacking things seems to be better (Lgb)
+                       if (static_cast<unsigned char>(key) == key
+                               && !iscntrl(key))
+                               ret_key = key;
+                       else
+                               ret_key = (keysym ? keysym : key);
                }
                
 #endif 
index a6dc131acb8b4bc24f002cc721dd1655d6ed4848..0ea038588b53a728104d9d25a483430c6627a9dc 100644 (file)
@@ -187,7 +187,9 @@ enum kb_action {
        LFUN_DELETE_SKIP,
        LFUN_MENUNEWTMPLT,              // Asger 1997-02-02
        LFUN_MENURELOAD,                // Asger 1997-02-02
+#if 0
        LFUN_FAX,                       // Asger 1997-02-10
+#endif
        LFUN_RECONFIGURE, // 170        // Asger 1997-02-14
        LFUN_CITATION_INSERT,           // AAS 97-02-23
        LFUN_INSERT_BIBTEX,             // AAS 97-02-23
index 0ce16f2f4411c33b7644099d337eb8efe5df4660..9787b712a6820711e5c30070d0db3fe6a83ab4ea 100644 (file)
@@ -68,7 +68,10 @@ extern BufferView * current_view; // called too many times in this file...
 
 extern void DeleteSimpleCutBuffer(); /* for the cleanup when exiting */
 
+#if 0
 extern bool send_fax(string const & fname, string const & sendcmd);
+#endif
+
 extern void MenuSendto();
 
 extern LyXServer * lyxserver;
@@ -320,7 +323,7 @@ int MenuRunChktex(Buffer * buffer)
        return ret;
 }
 
-
+#if 0
 void MenuFax(Buffer * buffer)
 {
        // Generate postscript file
@@ -343,6 +346,7 @@ void MenuFax(Buffer * buffer)
        } else
                send_fax(ps, lyxrc.fax_command);
 }
+#endif
 
 
 void QuitLyX()
index 6829b15472c0d10e8ab6d0d13a26ef7270f2878d..87a41cceb8eab9cdd5dfae1290638e27e9f79027 100644 (file)
@@ -35,7 +35,9 @@
 #include "lyxrc.h"
 #include "gettext.h"
 #include "lyx_gui_misc.h"
+#if FL_REVISION < 89
 #include "lyxlookup.h"
+#endif
 #include "bufferlist.h"
 #include "language.h"
 #include "ColorHandler.h"
@@ -163,8 +165,9 @@ LyXGUI::~LyXGUI()
        delete lyxserver;
        lyxserver = 0;
        delete lyxViews;
-
+#if FL_REVISION < 89
        CloseLyXLookup();
+#endif
 }
 
 
index 5bc2838f293dffa9f09ca0b86986850b80e99222..1d82d1de9aa69ee002428d78cd7e48b5db24c44e 100644 (file)
@@ -24,7 +24,9 @@
 #endif
 
 #include "version.h"
+#if 0
 #include "lyxlookup.h"
+#endif
 #include "kbmap.h"
 #include "lyxfunc.h"
 #include "bufferlist.h"
@@ -110,7 +112,9 @@ extern int  MenuRunChktex(Buffer *);
 extern void MenuPrint(Buffer *);
 extern void MenuSendto();
 extern void QuitLyX();
+#if 0
 extern void MenuFax(Buffer *);
+#endif
 extern void show_symbols_form(LyXFunc *);
 
 extern LyXAction lyxaction;
@@ -474,10 +478,12 @@ LyXFunc::func_status LyXFunc::getStatus(int ac) const
                disable = !Exporter::IsExportable(buf, "dvi")
                        || lyxrc.print_command == "none";
                break;
+#if 0
        case LFUN_FAX:
                disable = !Exporter::IsExportable(buf, "ps")
                        || lyxrc.fax_command == "none";
                break;
+#endif
        case LFUN_IMPORT:
                disable = !Importer::IsImportable(argument);
                break;
@@ -940,10 +946,12 @@ string const LyXFunc::Dispatch(int ac,
                owner->getDialogs()->showPrint();
                break;
 
+#if 0
        case LFUN_FAX:
                MenuFax(owner->buffer());
                break;
-                       
+#endif
+               
        case LFUN_EXPORT:
                Exporter::Export(owner->buffer(), argument, false);
                break;
index 4f4e20cd069d4ff6d3655a1d74b2da949f47f62b..aecd62b01980971efc86ef599d7d7c0e9d4decf0 100644 (file)
 #ifdef HAVE_XOPENIM
 // This part is the full blown Input Method manager for X11R5 and up.
 // For the plain-and-old-X11R4 version, see later.
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/keysym.h>
+#include FORMS_H_LOCATION
+//#include <X11/Xlib.h>
+//#include <X11/Xutil.h>
+//#include <X11/keysym.h>
+#if FL_REVISION < 89
 #ifdef HAVE_LOCALE_H
 #include <locale.h>
 #endif
@@ -262,3 +263,5 @@ void CloseLyXLookup()
 }
 
 #endif // HAVE_XOPENIM
+
+#endif
index 16205309c74f35698339b32d097fbb7b0a43dfd1..dbe6a40318a0cfcbb1d7e7c4aefdd93f4f484899 100644 (file)
    different input methods for different frames, but for now we can
    keep it as it is. */
 
-#include <X11/Xlib.h>
+#include <config.h>
+#include FORMS_H_LOCATION
+#if FL_REVISION < 89
+//#include <X11/Xlib.h>
 
 /// Initialize the compose key handling
 extern void InitLyXLookup(Display *, Window ) ;
@@ -25,3 +28,4 @@ extern int LyXLookupString(XEvent * event,
 
 /// Call this when you destroy your window
 extern void CloseLyXLookup();
+#endif
index 58d2c92bc254374072011a9946328a49f8380d8d..7f224eb1610db9d6a909ff70af289fc6c5e5dce8 100644 (file)
@@ -71,8 +71,10 @@ keyword_item lyxrcTags[] = {
        { "\\document_path", LyXRC::RC_DOCUMENTPATH },
        { "\\escape_chars", LyXRC::RC_ESC_CHARS },
        { "\\exit_confirmation", LyXRC::RC_EXIT_CONFIRMATION },
+#if 0
        { "\\fax_command", LyXRC::RC_FAX_COMMAND },
        { "\\fax_program", LyXRC::RC_FAXPROGRAM },
+#endif
        { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
        { "\\format", LyXRC::RC_FORMAT },
        { "\\input", LyXRC::RC_INPUT },
@@ -91,7 +93,9 @@ keyword_item lyxrcTags[] = {
        { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
        { "\\override_x_deadkeys", LyXRC::RC_OVERRIDE_X_DEADKEYS },
        { "\\personal_dictionary", LyXRC::RC_PERS_DICT },
+#if 0
        { "\\phone_book", LyXRC::RC_PHONEBOOK },
+#endif
        { "\\print_adapt_output", LyXRC::RC_PRINT_ADAPTOUTPUT },
        { "\\print_collcopies_flag", LyXRC::RC_PRINTCOLLCOPIESFLAG },
        { "\\print_command", LyXRC::RC_PRINT_COMMAND },
@@ -731,6 +735,7 @@ int LyXRC::read(string const & filename)
                                cursor_follows_scrollbar = lexrc.GetBool();
                        break;
 
+#if 0
                case RC_FAX_COMMAND:
                        if (lexrc.next())
                                fax_command = lexrc.GetString();
@@ -748,6 +753,7 @@ int LyXRC::read(string const & filename)
                                        phone_book = user_lyxdir + s;
                        }
                        break;
+#endif
                case RC_ASCIIROFF_COMMAND:
                        if (lexrc.next())
                                ascii_roff_command = lexrc.GetString();
@@ -1318,6 +1324,7 @@ void LyXRC::output(ostream & os) const
                        os << "\\backupdir_path \"" << backupdir_path << "\"\n";
                }
 
+#if 0
                os << "\n#\n"
                   << "# FAX SECTION #######################################\n"
                   << "#\n\n";
@@ -1334,7 +1341,7 @@ void LyXRC::output(ostream & os) const
                if (fax_program != system_lyxrc.fax_program) {
                        os << "\\fax_program \"" << fax_program << "\"\n";
                }
-
+#endif
                os << "\n#\n"
                   << "# ASCII EXPORT SECTION ##############################\n"
                   << "#\n\n";
@@ -1628,7 +1635,8 @@ string LyXRC::getFeedback(LyXRCTags tag)
        case RC_KBMAP_SECONDARY:
                str = N_("Use this to set the correct mapping file for your keyboard.\nYou'll need this if you for instance want to type German documents\non an American keyboard.");
                break;
-               
+
+#if 0
        case RC_FAX_COMMAND:
                break;
                
@@ -1637,7 +1645,7 @@ string LyXRC::getFeedback(LyXRCTags tag)
                
        case RC_FAXPROGRAM:
                break;
-               
+#endif 
        case RC_ASCIIROFF_COMMAND:
                str = N_("Use to define an external program to render tables in the ASCII output.\nE.g. \"groff -t -Tlatin1 $$FName\"  where $$FName is the input file.\nIf \"none\" is specified, an internal routine is used.");
                break;
index 5e547d2d5b18476db800d1258e5195a3835ce475..96bee36ee45e801a99f1abffa8b4d6fa149a836e 100644 (file)
@@ -74,9 +74,11 @@ enum LyXRCTags {
        RC_KBMAP,
        RC_KBMAP_PRIMARY,
        RC_KBMAP_SECONDARY,
+#if 0
        RC_FAX_COMMAND,
        RC_PHONEBOOK,
        RC_FAXPROGRAM,
+#endif
        RC_ASCIIROFF_COMMAND,
        RC_ASCII_LINELEN,
        RC_NUMLASTFILES,
@@ -259,12 +261,14 @@ enum LyXRCTags {
        string font_norm_menu;
        ///
        unsigned int autosave;
+#if 0
        ///
        string fax_command;
        ///
        string phone_book;
        ///
        string fax_program;
+#endif
        ///
        string ascii_roff_command;
        ///
index 5b10679fb142b219f6d7a2125bc00f4a90453ebd..3b56a6ce2b55995d4004fec0c90cfdf064554527 100644 (file)
@@ -46,6 +46,14 @@ using std::endl;
 using std::vector;
 using std::max;
 
+#if 0
+using std::strncmp;
+using std::strcmp;
+using std::abs;
+using std::isdigit;
+using std::isalpha;
+#endif
+
 //extern char * mathed_label;
 extern string mathed_label;
 
index b2f48bf3c3f35c6612ceb28dffc2d9a5e46c7490..c9e215a09b3b417f300b488fd988defe12b4922a 100644 (file)
 #include "matrix.xpm"
 #include "equation.xpm"
 
+#if 0
+using std::free;
+#endif
+
 static LyXFunc * lyxfunc = 0;
 
 //static FD_panel* symb_form= 0;
index 533c3224dd60d65749778021d3b950dca64501ea..8e7232c9ccd1fa139344fa52266ac4df8ec7d539 100644 (file)
 using std::istream;
 using std::endl;
 
+#if 0
+using std::isalpha;
+using std::isdigit;
+using std::isspace;
+#endif
+
 enum {
        FLAG_BRACE      = 1,    //  A { needed
        FLAG_BRACE_ARG  = 2,    //  Next { is argument
index 6dc1e816444c9fd7341f349d28b6d2d2309bbafb..2fd52c60b4467ced7ccb0de946511357873557c9 100644 (file)
@@ -3619,9 +3619,6 @@ LyXParagraph * LyXParagraph::TeXFootnote(Buffer const * buf,
                                "Footnote in a Footnote -- not supported"
                               << endl;
                }
-//#ifndef HAVE_OSTREAM
-//             delete [] dummy.str();
-//#endif
        }
 
        switch (footnotekind) {
index 2e9b3ed580686601027da914b4a8f0d9012516f5..835b999af0f6cc56316cc453e751f2f68a16be9c 100644 (file)
@@ -4,6 +4,10 @@
 
 #include "lyxlib.h"
 
+#if 0
+using std::atoi;
+#endif
+
 int lyx::atoi(string const & nstr)
 {
        return ::atoi(nstr.c_str());
index 4230a394f7f9cb2e775472395497e57c378e8174..748c210dbb0a278b5cf3d1138a949ae041368446 100644 (file)
@@ -58,6 +58,13 @@ using std::pair;
 using std::endl;
 using std::ifstream;
 
+#if 0
+using std::getenv;
+using std::isalpha;
+using std::isalnum;
+using std::popen;
+#endif
+
 extern string system_lyxdir;
 extern string build_lyxdir;
 extern string user_lyxdir;
@@ -290,7 +297,7 @@ i18nLibFileSearch(string const & dir, string const & name,
 string const GetEnv(string const & envname)
 {
         // f.ex. what about error checking?
-        char const * const ch = ::getenv(envname.c_str());
+        char const * const ch = getenv(envname.c_str());
         string const envstr = !ch ? "" : ch;
         return envstr;
 }
index d7b4897e0829fcfa3169732659305da3aeadc2f7..c3640681005da6a9905afe67b388f7b0f77bf888 100644 (file)
@@ -8,6 +8,10 @@
 
 #include "LString.h"
 
+#if 0
+using std::vsnprintf;
+#endif
+
 /* This output manipulator gives the option to use Old style format
    specifications in ostreams. Note that this is done at the expense
    of typesafety, so if possible this manipulator should be avoided.
@@ -33,7 +37,7 @@ string fmt(char const * fmtstr ...)
        va_list ap;
        while (true) {
                va_start(ap, fmtstr);
-               int const r = ::vsnprintf(str, size, fmtstr, ap);
+               int const r = vsnprintf(str, size, fmtstr, ap);
                va_end(ap);
                if (r == -1) { // size is too small
                        delete [] str;
index 4fd267218c12ae54f84e917cbb6bd4df8aa75a4a..98b6c45c0dd3cee30135d2739a8e15f3590b4223 100644 (file)
@@ -164,17 +164,14 @@ void Trans::AddDeadkey(tex_accent accent, string const & keys,
 #else
                string & temp =
                        keymap_[static_cast<unsigned char>(keys[i])];
-               if (!temp.empty()) {
-                       temp[0] = 0;
-                       temp[1] = accent;
-               } else {
-                       // But the question remains: "Should we be allowed
-                       // to change bindings, without unbinding first?"
-                       // Lgb
-                       lyxerr << "Hey... keymap_[xx] not empty." << endl;
-                       temp += char(0);
-                       temp += char(accent);
-               }
+               if (!temp.empty())
+                       temp.erase();
+
+               // But the question remains: "Should we be allowed
+               // to change bindings, without unbinding first?"
+               // Lgb
+               temp += char(0);
+               temp += char(accent);
 #endif
        }
        kmod_list_[accent]->exception_list = 0;