From eca4bcddc99c8d8eb4c0e1b647cc3ba13c3ea5ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Tue, 28 Nov 2000 15:54:29 +0000 Subject: [PATCH] use setLyXSize and the solaris mkstemp patch git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1243 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 13 +++++++++++++ acconfig.h | 12 ++++++++++++ config/lyxinclude.m4 | 32 ++++++++++++++++++++++++++++++++ configure.in | 2 ++ po/POTFILES.in | 28 ++++++++++++++-------------- src/bufferview_funcs.C | 2 +- src/lyxfont.C | 2 ++ src/lyxfont.h | 6 ++++-- 8 files changed, 80 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 58e28e48a2..5ca3954108 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2000-11-28 Lars Gullik Bjønnes + + * src/lyxfont.[Ch] (setGUISize): comment out setGUISize + + * src/bufferview_funcs.C (FontSize): use setLyXSize + +2000-11-24 Kayvan A. Sylvan + + * acconfig.h, configure.in, config/lyxinclude.m4: Added autoconf tests + to check for systems where mkstemp() is available but not declared + in headers. The new autoconf macro lyx_CHECK_DECL can be used + to check for declarations in headers. + 2000-11-23 Angus Leeming * forms/bibforms.fd: tiny fix to get it to run with fdesign. diff --git a/acconfig.h b/acconfig.h index c4f91734cf..5232eee018 100644 --- a/acconfig.h +++ b/acconfig.h @@ -44,6 +44,9 @@ #undef USE_PSPELL +/* Define as 1 if the MKSTEMP function is declared */ +#undef HAVE_DECL_MKSTEMP + @BOTTOM@ /************************************************************ @@ -68,6 +71,15 @@ char * strerror(int n); #include "broken_headers.h" #endif +#ifdef HAVE_MKSTEMP +#ifndef HAVE_DECL_MKSTEMP +#if defined (__cplusplus) +extern "C" +#endif +int mkstemp(char*); +#endif +#endif + /* C++ always support the keyword `inline' */ #if defined inline && defined __cplusplus /**/#undef inline diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index af7fcfffc0..de99f8b4ef 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -933,3 +933,35 @@ AC_SUBST(FRONTEND_LDFLAGS) AC_SUBST(FRONTEND_INCLUDES) AC_SUBST(FRONTEND_LIBS) ]) + + +dnl Check things are declared in headers to avoid errors or warnings. +dnl Called like LYX_CHECK_DECL(function, headerfile) +dnl Defines HAVE_DECL_{FUNCTION} +AC_DEFUN(LYX_CHECK_DECL, +[AC_MSG_CHECKING(if $1 is declared by header $2) +tr_func=`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + +tr_hdr=`echo $2 | tr . _` +AC_CACHE_VAL([lyx_cv_declare_${tr_hdr}_$1], +[AC_EGREP_HEADER($1, $2, [eval "lyx_cv_declare_${tr_hdr}_$1=yes"], [eval "lyx_cv_declare_${tr_hdr}_$1=no"])]) +if eval "test \"\${lyx_cv_declare_${tr_hdr}_$1}\" = \"yes\""; then + AC_DEFINE_UNQUOTED(HAVE_DECL_${tr_func}) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi]) + +dnl This is the multiple headers version of the LYX_CHECK_DECL macro above. +dnl Called like LYX_CHECK_DECL_HDRS(function, file1 file2 file3) +AC_DEFUN(LYX_CHECK_DECL_HDRS, +[ got="no" +for I in $2; do +tr_hdr=`echo $I | tr . _` +if test "${got}" = "no"; then + LYX_CHECK_DECL($1, $I) +fi +if eval "test \"\${lyx_cv_declare_${tr_hdr}_$1}\" = \"yes\""; then + got="yes" +fi +done]) diff --git a/configure.in b/configure.in index 42361fb9f0..c9ee388add 100644 --- a/configure.in +++ b/configure.in @@ -264,6 +264,8 @@ LYX_FUNC_PUTENV_ARGTYPE # SunOS 4.1.3 does not have strerror and atexit AC_REPLACE_FUNCS(strerror atexit) +LYX_CHECL_DECL_HDRS(mkstemp, unistd.h stdlib.h) + ### and now some special lyx flags. AC_ARG_ENABLE(assertions, [ --enable-assertions add runtime sanity checks in the program],, diff --git a/po/POTFILES.in b/po/POTFILES.in index 68c1756219..759fffd4d4 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -48,35 +48,35 @@ src/frontends/kde/refdlg.C src/frontends/kde/tocdlg.C src/frontends/kde/urldlg.C src/frontends/xforms/FormBase.h -src/frontends/xforms/FormCitation.C src/frontends/xforms/form_citation.C -src/frontends/xforms/FormCopyright.C +src/frontends/xforms/FormCitation.C src/frontends/xforms/form_copyright.C -src/frontends/xforms/FormDocument.C +src/frontends/xforms/FormCopyright.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/FormGraphics.C +src/frontends/xforms/FormError.C src/frontends/xforms/form_graphics.C -src/frontends/xforms/FormIndex.C +src/frontends/xforms/FormGraphics.C src/frontends/xforms/form_index.C +src/frontends/xforms/FormIndex.C src/frontends/xforms/FormInset.h -src/frontends/xforms/FormParagraph.C src/frontends/xforms/form_paragraph.C -src/frontends/xforms/FormPreferences.C +src/frontends/xforms/FormParagraph.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/FormTabular.C +src/frontends/xforms/FormRef.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/FormToc.C +src/frontends/xforms/FormTabularCreate.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/Menubar_pimpl.C src/frontends/xforms/xform_helpers.C src/gettext.h diff --git a/src/bufferview_funcs.C b/src/bufferview_funcs.C index 80146c4483..bcdf2cc0c6 100644 --- a/src/bufferview_funcs.C +++ b/src/bufferview_funcs.C @@ -241,7 +241,7 @@ void Underline(BufferView * bv) void FontSize(BufferView * bv, string const & size) { LyXFont font(LyXFont::ALL_IGNORE); - font.setGUISize(size); + font.setLyXSize(size); ToggleAndShow(bv, font); } diff --git a/src/lyxfont.C b/src/lyxfont.C index fa54c547b5..5c81bcfacc 100644 --- a/src/lyxfont.C +++ b/src/lyxfont.C @@ -504,6 +504,7 @@ LyXFont & LyXFont::setLyXColor(string const & col) } +#if 0 /// Sets size after GUI name LyXFont & LyXFont::setGUISize(string const & siz) { @@ -514,6 +515,7 @@ LyXFont & LyXFont::setGUISize(string const & siz) setColor(lcolor.getFromGUIName(siz)); return *this; } +#endif // Returns size in latex format diff --git a/src/lyxfont.h b/src/lyxfont.h index aedd3236f5..ad1a4a17f0 100644 --- a/src/lyxfont.h +++ b/src/lyxfont.h @@ -262,10 +262,12 @@ public: /// Sets color after LyX text format LyXFont & setLyXColor(string const &); - + +#if 0 /// Sets size after GUI name LyXFont & setGUISize(string const &); - +#endif + /// Returns size of font in LaTeX text notation string const latexSize() const; -- 2.39.2