From: Lars Gullik Bjønnes Date: Thu, 2 Nov 2000 04:48:34 +0000 (+0000) Subject: comment out the fax stuff, diable LyXLookup completely when xforms 0.89, fix some... X-Git-Tag: 1.6.10~21853 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=85f8bf7445db373d95bad64faede475e0f6f9049;p=lyx.git comment out the fax stuff, diable LyXLookup completely when xforms 0.89, fix some accent issues git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1181 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/ChangeLog b/ChangeLog index 7ad3e90ec9..d6c9d2746c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,43 @@ +2000-11-02 Lars Gullik Bjønnes + + * 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 + (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 + * 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 diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index 10e263f348..b6114f13d2 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -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 diff --git a/po/POTFILES.in b/po/POTFILES.in index 814cab19bf..cfcf301617 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -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 diff --git a/sigc++/thread.cc b/sigc++/thread.cc index 43ad7c14ed..d9b0d4d200 100644 --- a/sigc++/thread.cc +++ b/sigc++/thread.cc @@ -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_);} diff --git a/sigc++/thread.h b/sigc++/thread.h index ae9696a654..188738c60d 100644 --- a/sigc++/thread.h +++ b/sigc++/thread.h @@ -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); }; diff --git a/src/LyXAction.C b/src/LyXAction.C index 9d7c99e2b3..d89f4ffd39 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -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 diff --git a/src/LyXView.C b/src/LyXView.C index 100eb409d6..292a2581a5 100644 --- a/src/LyXView.C +++ b/src/LyXView.C @@ -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 } diff --git a/src/Makefile.am b/src/Makefile.am index cca044c27e..6aa2482969 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 \ diff --git a/src/WorkArea.C b/src/WorkArea.C index 0821f000f4..85268e6d23 100644 --- a/src/WorkArea.C +++ b/src/WorkArea.C @@ -10,7 +10,7 @@ #include #include - +#include #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(key) == key + && !iscntrl(key)) + ret_key = key; + else + ret_key = (keysym ? keysym : key); } #endif diff --git a/src/commandtags.h b/src/commandtags.h index a6dc131acb..0ea038588b 100644 --- a/src/commandtags.h +++ b/src/commandtags.h @@ -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 diff --git a/src/lyx_cb.C b/src/lyx_cb.C index 0ce16f2f44..9787b712a6 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -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() diff --git a/src/lyx_gui.C b/src/lyx_gui.C index 6829b15472..87a41cceb8 100644 --- a/src/lyx_gui.C +++ b/src/lyx_gui.C @@ -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 } diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 5bc2838f29..1d82d1de9a 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -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; diff --git a/src/lyxlookup.C b/src/lyxlookup.C index 4f4e20cd06..aecd62b019 100644 --- a/src/lyxlookup.C +++ b/src/lyxlookup.C @@ -17,10 +17,11 @@ #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 -#include -#include +#include FORMS_H_LOCATION +//#include +//#include +//#include +#if FL_REVISION < 89 #ifdef HAVE_LOCALE_H #include #endif @@ -262,3 +263,5 @@ void CloseLyXLookup() } #endif // HAVE_XOPENIM + +#endif diff --git a/src/lyxlookup.h b/src/lyxlookup.h index 16205309c7..dbe6a40318 100644 --- a/src/lyxlookup.h +++ b/src/lyxlookup.h @@ -13,7 +13,10 @@ different input methods for different frames, but for now we can keep it as it is. */ -#include +#include +#include FORMS_H_LOCATION +#if FL_REVISION < 89 +//#include /// 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 diff --git a/src/lyxrc.C b/src/lyxrc.C index 58d2c92bc2..7f224eb161 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -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; diff --git a/src/lyxrc.h b/src/lyxrc.h index 5e547d2d5b..96bee36ee4 100644 --- a/src/lyxrc.h +++ b/src/lyxrc.h @@ -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; /// diff --git a/src/mathed/formula.C b/src/mathed/formula.C index 5b10679fb1..3b56a6ce2b 100644 --- a/src/mathed/formula.C +++ b/src/mathed/formula.C @@ -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; diff --git a/src/mathed/math_panel.C b/src/mathed/math_panel.C index b2f48bf3c3..c9e215a09b 100644 --- a/src/mathed/math_panel.C +++ b/src/mathed/math_panel.C @@ -37,6 +37,10 @@ #include "matrix.xpm" #include "equation.xpm" +#if 0 +using std::free; +#endif + static LyXFunc * lyxfunc = 0; //static FD_panel* symb_form= 0; diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index 533c3224dd..8e7232c9cc 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -34,6 +34,12 @@ 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 diff --git a/src/paragraph.C b/src/paragraph.C index 6dc1e81644..2fd52c60b4 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -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) { diff --git a/src/support/atoi.C b/src/support/atoi.C index 2e9b3ed580..835b999af0 100644 --- a/src/support/atoi.C +++ b/src/support/atoi.C @@ -4,6 +4,10 @@ #include "lyxlib.h" +#if 0 +using std::atoi; +#endif + int lyx::atoi(string const & nstr) { return ::atoi(nstr.c_str()); diff --git a/src/support/filetools.C b/src/support/filetools.C index 4230a394f7..748c210dbb 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -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; } diff --git a/src/support/fmt.C b/src/support/fmt.C index d7b4897e08..c364068100 100644 --- a/src/support/fmt.C +++ b/src/support/fmt.C @@ -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; diff --git a/src/trans.C b/src/trans.C index 4fd267218c..98b6c45c0d 100644 --- a/src/trans.C +++ b/src/trans.C @@ -164,17 +164,14 @@ void Trans::AddDeadkey(tex_accent accent, string const & keys, #else string & temp = keymap_[static_cast(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;