From 7110e1c15e73fff6d38faa83faf1abf95d66cb3f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 2 Oct 2021 18:28:33 -0400 Subject: [PATCH] small format tweaks - brief description should not end in a dot as it becomes a title line - add empty line to separate title from body of description - revert order of file/path separator constants so that the Linux version shows up in doxygen --- src/platform.h | 56 +++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/src/platform.h b/src/platform.h index 55131ec803..b7c5d28561 100644 --- a/src/platform.h +++ b/src/platform.h @@ -42,7 +42,7 @@ namespace platform { double walltime(); - /*! Return string with the Operating system version and architecture info. + /*! Return string with the operating system version and architecture info * * \return string with info about the OS and the platform is is running on */ @@ -120,6 +120,7 @@ namespace platform { void *dlopen(const std::string &fname); /*! Close a shared object + * * This releases the object corresponding to the provided handle. * Resolved symbols associated with this handle may not be used * after this call @@ -137,28 +138,30 @@ namespace platform { void *dlsym(void *handle, const std::string &symbol); - /*! File path component separators - * These are the characters that separate directories and filename in paths on - * a platform. If multiple are provided, the first is the preferred one. */ - -#if defined(_WIN32) - constexpr char filepathsep[] = "\\/"; -#else - constexpr char filepathsep[] = "/"; -#endif - - /*! Path environment variable component separator - * This is the character that separates entries in "PATH" environment variables. */ - -#if defined(_WIN32) - constexpr char pathvarsep = ';'; -#else - constexpr char pathvarsep = ':'; -#endif - - /*! Try to detect pathname from FILE pointer. + /*! Platform specific file path component separator * - * Currently only supported on Linux and MacOS, otherwise will report "(unknown)". + * This is a string with the character that separates directories and filename in paths on + * a platform. If multiple are characters are provided, the first is the preferred one. */ + +#if !defined(_WIN32) + constexpr char filepathsep[] = "/"; +#else + constexpr char filepathsep[] = "\\/"; +#endif + + /*! Platform specific path environment variable component separator + * + * This is the character that separates entries in "PATH"-style environment variables. */ + +#if !defined(_WIN32) + constexpr char pathvarsep = ':'; +#else + constexpr char pathvarsep = ';'; +#endif + + /*! Try to detect pathname from FILE pointer + * + * Currently only supported on Linux, MacOS, and Windows. Otherwise will report "(unknown)". * * \param fp FILE pointer struct from STDIO library for which we want to detect the name * \param buf storage buffer for pathname. output will be truncated if not large enough @@ -308,7 +311,7 @@ namespace platform { /*! Join two pathname segments * * This uses the forward slash '/' character unless LAMMPS is compiled - * for Windows where it used the equivalent backward slash '\\'. + * for Windows where it uses the backward slash '\\' * * \param a first path * \param b second path @@ -324,21 +327,22 @@ namespace platform { bool file_is_readable(const std::string &path); /*! Check if a file name ends in a known extension for a compressed file format - * Currently supported extensions are: .Z, .gz, .bz2, .zstd, .xz, .lzma + * + * Currently supported file extensions are: .gz, .bz2, .zstd, .xz, .lzma, lz4 * * \param file name of the file to check * \return true if the file has a known extension, otherwise false */ bool has_zip_extension(const std::string &file); - /*! Open pipe to compressed text file for reading. + /*! Open pipe to compressed text file for reading * * \param file name of the file to open * \return FILE pointer to pipe using for reading the compressed file. */ FILE *zip_read(const std::string &file); - /*! Open pipe to compressed text file for writing. + /*! Open pipe to compressed text file for writing * * \param file name of the file to open * \return FILE pointer to pipe using for reading the compressed file. */