// -*- C++ -*- /* This file is part of * ====================================================== * * LyX, The Document Processor * * Copyright (C) 1995 Matthias Ettrich * Copyright (C) 1995-1998 The LyX Team. *
*======================================================*/
/// generates an checksum unsignedlong lyxsum(charconst *file);
/// returns a date string inlinechar* date()
{
time_t tid; if ((tid=time(NULL)) == -1) return (char*)NULL; else return (ctime(&tid));
}
// 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)? /// inline LString getUserName()
{
LString userName ;
userName = getenv("LOGNAME"); if (userName.empty())
userName = getenv("USER"); if (userName.empty())
userName = _("unknown"); return userName;
}
/// Returns the maximum of two integers. inline int Maximum(int a, int b)
{ return ((a>b) ? a : b);
}
/// Returns the minimum of two integers. inline int Minimum(int a, int b)
{ return ((a<b) ? a : b);
}
#endif
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.