2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright (C) 1995 Matthias Ettrich
8 * Copyright (C) 1995-1998 The LyX Team.
10 *======================================================*/
20 /// generates an checksum
21 unsigned long lyxsum(char const *file);
23 /// returns a date string
27 if ((tid=time(NULL)) == (time_t)-1)
34 // Where can I put this? I found the occurence of the same code
35 // three/four times. Don't you think it better to use a macro definition
36 // (an inlined member of some class)?
38 inline LString getUserName()
41 userName = getenv("LOGNAME");
43 userName = getenv("USER");
45 userName = _("unknown");
50 /// Returns the maximum of two integers.
52 int Maximum(int a, int b)
54 return ((a>b) ? a : b);
58 /// Returns the minimum of two integers.
60 int Minimum(int a, int b)
62 return ((a<b) ? a : b);