]> git.lyx.org Git - features.git/blob - src/support/lyxlib.h
1688e2d015c5b925060637ac646190b0fe94df99
[features.git] / src / support / lyxlib.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  * 
5  *           LyX, The Document Processor
6  *        
7  *           Copyright (C) 1995 Matthias Ettrich
8  *           Copyright (C) 1995-1999 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 namespace lyx {
24         ///
25         char * getcwd(char * buffer, size_t size);
26         ///
27         int chdir(char const * name);
28         /// generates a checksum
29         unsigned long sum(char const * file);
30         /// returns a date string (not used currently)
31         char * date(); 
32         /// returns the name of the user (not used currently)
33         string getUserName();
34         ///
35         int kill(long int pid, int sig);
36         ///
37         void abort();
38 }
39 #else
40 struct lyx {
41         ///
42         static char * getcwd(char * buffer, size_t size);
43         ///
44         static int chdir(char const * name);
45         /// generates a checksum
46         static unsigned long sum(char const * file);
47         /// returns a date string (not used currently)
48         static char * date(); 
49         /// returns the name of the user (not used currently)
50         static string getUserName();
51         ///
52         static int kill(long int pid, int sig);
53         ///
54         static void abort();
55 };
56 #endif // CXX_WORKING_NAMESPACES
57 #endif