1999-10-02 16:21:10 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
1999-11-15 10:54:16 +00:00
|
|
|
* ======================================================
|
1999-10-02 16:21:10 +00:00
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
2000-03-09 03:36:48 +00:00
|
|
|
* Copyright 1995 Matthias Ettrich
|
|
|
|
* Copyright 1995-2000 The LyX Team.
|
1999-10-02 16:21:10 +00:00
|
|
|
*
|
1999-11-15 10:54:16 +00:00
|
|
|
* ====================================================== */
|
1999-10-02 16:21:10 +00:00
|
|
|
|
|
|
|
#ifndef LYX_LIB_H
|
|
|
|
#define LYX_LIB_H
|
|
|
|
|
|
|
|
#include "LString.h"
|
|
|
|
|
|
|
|
// Where can I put this? I found the occurence of the same code
|
|
|
|
// three/four times. Don't you think it better to use a macro definition
|
|
|
|
// (an inlined member of some class)?
|
1999-11-01 04:22:28 +00:00
|
|
|
|
|
|
|
// This should have been a namespace
|
2000-01-17 22:42:04 +00:00
|
|
|
#ifdef CXX_WORKING_NAMESPACES
|
|
|
|
namespace lyx {
|
|
|
|
///
|
|
|
|
char * getcwd(char * buffer, size_t size);
|
|
|
|
///
|
|
|
|
int chdir(char const * name);
|
2000-01-19 14:07:39 +00:00
|
|
|
/// generates a checksum
|
2000-01-17 22:42:04 +00:00
|
|
|
unsigned long sum(char const * file);
|
2000-01-19 14:07:39 +00:00
|
|
|
/// returns a date string (not used currently)
|
2000-01-17 22:42:04 +00:00
|
|
|
char * date();
|
2000-01-19 14:07:39 +00:00
|
|
|
/// returns the name of the user (not used currently)
|
2000-01-17 22:42:04 +00:00
|
|
|
string getUserName();
|
|
|
|
///
|
2000-01-19 14:07:39 +00:00
|
|
|
int kill(long int pid, int sig);
|
2000-01-17 22:42:04 +00:00
|
|
|
///
|
|
|
|
void abort();
|
2000-01-20 01:41:55 +00:00
|
|
|
///
|
2000-01-21 13:54:13 +00:00
|
|
|
int mkdir(char const * pathname, unsigned long int mode);
|
2000-01-20 01:41:55 +00:00
|
|
|
///
|
|
|
|
int putenv(char const * str);
|
2000-01-17 22:42:04 +00:00
|
|
|
}
|
|
|
|
#else
|
1999-11-01 04:22:28 +00:00
|
|
|
struct lyx {
|
2000-01-17 21:01:30 +00:00
|
|
|
///
|
|
|
|
static char * getcwd(char * buffer, size_t size);
|
|
|
|
///
|
|
|
|
static int chdir(char const * name);
|
2000-01-19 14:07:39 +00:00
|
|
|
/// generates a checksum
|
2000-01-17 21:01:30 +00:00
|
|
|
static unsigned long sum(char const * file);
|
2000-01-19 14:07:39 +00:00
|
|
|
/// returns a date string (not used currently)
|
2000-01-17 21:01:30 +00:00
|
|
|
static char * date();
|
2000-01-19 14:07:39 +00:00
|
|
|
/// returns the name of the user (not used currently)
|
2000-01-17 21:01:30 +00:00
|
|
|
static string getUserName();
|
|
|
|
///
|
2000-01-19 14:07:39 +00:00
|
|
|
static int kill(long int pid, int sig);
|
2000-01-17 21:01:30 +00:00
|
|
|
///
|
|
|
|
static void abort();
|
2000-01-20 01:41:55 +00:00
|
|
|
///
|
2000-01-21 13:54:13 +00:00
|
|
|
static int mkdir(char const * pathname, unsigned long int mode);
|
2000-01-20 01:41:55 +00:00
|
|
|
///
|
|
|
|
static int putenv(char const * str);
|
1999-11-01 04:22:28 +00:00
|
|
|
};
|
2000-01-17 22:42:04 +00:00
|
|
|
#endif // CXX_WORKING_NAMESPACES
|
1999-10-02 16:21:10 +00:00
|
|
|
#endif
|