]> git.lyx.org Git - lyx.git/commitdiff
use setLyXSize and the solaris mkstemp patch
authorLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 28 Nov 2000 15:54:29 +0000 (15:54 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 28 Nov 2000 15:54:29 +0000 (15:54 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1243 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
acconfig.h
config/lyxinclude.m4
configure.in
po/POTFILES.in
src/bufferview_funcs.C
src/lyxfont.C
src/lyxfont.h

index 58e28e48a2f365e4bb07d7749ff00c092dc10a5b..5ca3954108a74b21ccf29ded82b39c5d51f571b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2000-11-28  Lars Gullik Bjønnes  <larsbj@lyx.org>
+
+       * src/lyxfont.[Ch] (setGUISize): comment out setGUISize
+
+       * src/bufferview_funcs.C (FontSize): use setLyXSize
+
+2000-11-24  Kayvan A. Sylvan <kayvan@sylvan.com>
+
+       * 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 <a.leeming@ic.ac.uk>
 
        * forms/bibforms.fd: tiny fix to get it to run with fdesign.
index c4f91734cfe9cb6576815dfe84e62f137bded1c5..5232eee0189e7b41585362d79347cb45af7edef9 100644 (file)
@@ -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
index af7fcfffc0a7306af5a8301f9616eb85b61b5f58..de99f8b4ef6382c7b1638a00d83edf8f35ca3fb5 100644 (file)
@@ -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])
index 42361fb9f087ccaab959165851ab8597e0ac2ef0..c9ee388add35fabda102c6807be1db5876665f1f 100644 (file)
@@ -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],,
index 68c17562193530019c96f863b78e9b6bf40bd257..759fffd4d49900353678e1dd8d03851ae9d88190 100644 (file)
@@ -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
index 80146c4483ff39ac64eb046f5cf7b227118e6429..bcdf2cc0c6fb77514a5cfda56e0fe68f292eb6e7 100644 (file)
@@ -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);
 }
 
index fa54c547b5ae2fbb59bb53b5519684f2765e2367..5c81bcfacce8dceb8cfd015d1b2763cbdef24021 100644 (file)
@@ -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
index aedd3236f50f182f65a38001b06b1bb2dc076256..ad1a4a17f0eba7aa59e5fc2c1a8bf9b3f2404408 100644 (file)
@@ -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;