mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Some portability fixes; fix header of linuxdoc files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@425 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
39fb0d0e42
commit
b2a0b59aa6
23
ChangeLog
23
ChangeLog
@ -1,3 +1,26 @@
|
||||
2000-01-19 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* src/support/LAssert.h: do not do partial specialization. We do
|
||||
not really need it.
|
||||
|
||||
* src/support/lyxlib.h: note that lyx::getUserName() and
|
||||
lyx::date() are not in use right now. Should these be suppressed?
|
||||
|
||||
* src/buffer.C (makeLaTeXFile): we do not need the user name here.
|
||||
(makeLinuxDocFile): do not put date and user name in linuxdoc
|
||||
headers.
|
||||
|
||||
* src/support/lyxlib.h (kill): change first argument to long int,
|
||||
since that's what solaris uses.
|
||||
|
||||
* src/support/kill.C (kill): fix declaration to match prototype.
|
||||
|
||||
* config/lyxinclude.m4 (LYX_CXX_NAMESPACES): fix the macro to
|
||||
actually check whether namespaces are supported. This is not what
|
||||
it used to do.
|
||||
|
||||
* src/support/lyxsum.C: add a using directive.
|
||||
|
||||
2000-01-17 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* src/support/kill.C: if we have namespace support we don't have
|
||||
|
@ -425,10 +425,11 @@ dnl good enough to suit our needs.
|
||||
AC_DEFUN(LYX_CXX_NAMESPACES,[
|
||||
AC_CACHE_CHECK(for correct namespaces support,lyx_cv_cxx_namespace,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <vector>
|
||||
using std::vector;
|
||||
namespace foo {
|
||||
int bar;
|
||||
}
|
||||
],[
|
||||
vector<int> test;
|
||||
foo::bar = 0;
|
||||
return 0;
|
||||
],lyx_cv_cxx_namespace=yes,lyx_cv_cxx_namespace=no)
|
||||
])
|
||||
|
@ -425,10 +425,11 @@ dnl good enough to suit our needs.
|
||||
AC_DEFUN(LYX_CXX_NAMESPACES,[
|
||||
AC_CACHE_CHECK(for correct namespaces support,lyx_cv_cxx_namespace,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <vector>
|
||||
using std::vector;
|
||||
namespace foo {
|
||||
int bar;
|
||||
}
|
||||
],[
|
||||
vector<int> test;
|
||||
foo::bar = 0;
|
||||
return 0;
|
||||
],lyx_cv_cxx_namespace=yes,lyx_cv_cxx_namespace=no)
|
||||
])
|
||||
|
@ -80,7 +80,7 @@ src/print_form.C
|
||||
src/spellchecker.C
|
||||
src/sp_form.C
|
||||
src/support/filetools.C
|
||||
src/support/lyxlib.h
|
||||
src/support/getUserName.C
|
||||
src/support/path.h
|
||||
src/TableLayout.C
|
||||
src/text2.C
|
||||
|
@ -1588,7 +1588,6 @@ void Buffer::makeLaTeXFile(string const & fname,
|
||||
// first paragraph of the document. (Asger)
|
||||
texrow.start(paragraph, 0);
|
||||
|
||||
string userName(lyx::getUserName());
|
||||
string LFile;
|
||||
|
||||
if (!only_body && nice) {
|
||||
@ -2146,9 +2145,9 @@ void Buffer::makeLinuxDocFile(string const & fname, int column)
|
||||
<< params.preamble << " \n]>\n\n";
|
||||
}
|
||||
|
||||
string userName(lyx::getUserName());
|
||||
ofs << "<!-- LinuxDoc file was created by LyX 1.0 (C) 1995-1999 "
|
||||
<< "by <" << userName << "> " << lyx::date() << " -->\n";
|
||||
ofs << "<!-- " << LYX_DOCVERSION
|
||||
<< " created this file. For more info see http://www.lyx.org/"
|
||||
<< " -->\n";
|
||||
|
||||
if(params.options.empty())
|
||||
sgmlOpenTag(ofs, 0, top_element);
|
||||
|
@ -17,19 +17,6 @@ template<class A> inline void Assert(A assertion)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_PARTIAL_SPECIALIZATION
|
||||
// Not too sure if this is the correct way to specialize
|
||||
template<class A> inline void Assert(A * ptr)
|
||||
{
|
||||
Assert<void const *>(ptr);
|
||||
}
|
||||
template<> inline void Assert(void const * ptr)
|
||||
{
|
||||
if (!ptr) {
|
||||
lyx::abort();
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_PARTIAL_SPECIALIZATION */
|
||||
|
||||
//template<class A, class E> inline void Assert(A assertion, E except)
|
||||
//{
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#ifdef CXX_WORKING_NAMESPACES
|
||||
namespace lyx {
|
||||
int kill(pid_t pid, int sig)
|
||||
int kill(long int pid, int sig)
|
||||
{
|
||||
return ::kill(pid, sig);
|
||||
}
|
||||
@ -13,7 +13,7 @@ namespace lyx {
|
||||
#else
|
||||
#include "lyxlib.h"
|
||||
|
||||
int lyx::kill(pid_t pid, int sig)
|
||||
int lyx::kill(long int pid, int sig)
|
||||
{
|
||||
return ::kill(pid, sig);
|
||||
}
|
||||
|
@ -25,14 +25,14 @@ namespace lyx {
|
||||
char * getcwd(char * buffer, size_t size);
|
||||
///
|
||||
int chdir(char const * name);
|
||||
/// generates an checksum
|
||||
/// generates a checksum
|
||||
unsigned long sum(char const * file);
|
||||
/// returns a date string
|
||||
/// returns a date string (not used currently)
|
||||
char * date();
|
||||
///
|
||||
/// returns the name of the user (not used currently)
|
||||
string getUserName();
|
||||
///
|
||||
int kill(int pid, int sig);
|
||||
int kill(long int pid, int sig);
|
||||
///
|
||||
void abort();
|
||||
}
|
||||
@ -42,14 +42,14 @@ struct lyx {
|
||||
static char * getcwd(char * buffer, size_t size);
|
||||
///
|
||||
static int chdir(char const * name);
|
||||
/// generates an checksum
|
||||
/// generates a checksum
|
||||
static unsigned long sum(char const * file);
|
||||
/// returns a date string
|
||||
/// returns a date string (not used currently)
|
||||
static char * date();
|
||||
///
|
||||
/// returns the name of the user (not used currently)
|
||||
static string getUserName();
|
||||
///
|
||||
static int kill(int pid, int sig);
|
||||
static int kill(long int pid, int sig);
|
||||
///
|
||||
static void abort();
|
||||
};
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
#include "support/lyxlib.h"
|
||||
|
||||
using std::ifstream;
|
||||
|
||||
/* Number of bytes to read at once. */
|
||||
#define BUFLEN (1 << 16)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user