-// This should have been a namespace
-struct lyx {
- static char * getcwd(char * buffer, size_t size) {
-#ifndef __EMX__
- return ::getcwd(buffer, size);
-#else
- return ::_getcwd2(buffer, size);
-#endif
- };
- static chdir(const char * name) {
-#ifndef __EMX__
- return ::chdir(name);
-#else
- return ::_chdir2(name);
-#endif
- };
-};
-#endif
+/// round \p x to nearest integer
+inline int iround(double x)
+{
+ return static_cast<int>(round(x));
+}
+
+} // namespace support
+} // namespace lyx
+
+#endif /* LYX_LIB_H */