]> git.lyx.org Git - lyx.git/blob - src/support/lyxlib.h
remove commented HAVE_SSTREAM code
[lyx.git] / src / support / lyxlib.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  * 
5  *           LyX, The Document Processor
6  *        
7  *           Copyright 1995 Matthias Ettrich
8  *           Copyright 1995-2000 The LyX Team.
9  *
10  * ====================================================== */
11
12 #ifndef LYX_LIB_H
13 #define LYX_LIB_H
14
15 #include "LString.h"
16
17 // Where can I put this?  I found the occurence of the same code
18 // three/four times. Don't you think it better to use a macro definition
19 // (an inlined member of some class)?
20
21 // This should have been a namespace
22 #ifdef CXX_WORKING_NAMESPACES
23 ///
24 namespace lyx {
25         ///
26         char * getcwd(char * buffer, size_t size);
27         ///
28         int chdir(char const * name);
29         /// Returns false it it fails
30         bool rename(char const * from, char const * to);
31         /// Returns false it it fails
32         bool copy(string const & from, string const & to);
33         /// generates a checksum
34         unsigned long sum(char const * file);
35         /// returns a date string (not used currently)
36         char * date(); 
37         /// returns the name of the user (not used currently)
38         string const getUserName();
39         ///
40         int kill(long int pid, int sig);
41         ///
42         void abort();
43         ///
44         int mkdir(char const * pathname, unsigned long int mode);
45         ///
46         int putenv(char const * str);
47 }
48 #else
49 ///
50 struct lyx {
51         ///
52         static char * getcwd(char * buffer, size_t size);
53         ///
54         static int chdir(char const * name);
55         /// Returns false it it fails
56         static bool rename(char const * from, char const * to);
57         /// Returns false it it fails
58         static bool copy(string const & from, string const & to);
59         /// generates a checksum
60         static unsigned long sum(char const * file);
61         /// returns a date string (not used currently)
62         static char * date(); 
63         /// returns the name of the user (not used currently)
64         static string const getUserName();
65         ///
66         static int kill(long int pid, int sig);
67         ///
68         static void abort();
69         ///
70         static int mkdir(char const * pathname, unsigned long int mode);
71         ///
72         static int putenv(char const * str);
73 };
74 #endif // CXX_WORKING_NAMESPACES
75 #endif