================ @@ -43,6 +66,26 @@ void FORTRAN_PROCEDURE_NAME(flush)(const int &unit) { } } // namespace io +// CALL FDATE(DATE) +void FORTRAN_PROCEDURE_NAME(fdate)(std::byte *arg, std::int64_t length) { + // Day Mon dd hh:mm:ss yyyy\n\0 is 26 characters, e.g. + // Tue May 26 21:51:03 2015\n\0 + char str[26]; + // Insufficient space, fill with spaces and return. + if (length < 24) { + std::memset(reinterpret_cast<char *>(arg), ' ', length); + return; + } + + Terminator terminator{__FILE__, __LINE__}; + std::time_t current_time; + std::time(¤t_time); + CtimeBuffer(str, sizeof(str), current_time, terminator); + + // Pad space on \n\0 as well, start at index 24 (included). ---------------- klausler wrote:
What does "Pad space on \n\0 as well" mean? https://github.com/llvm/llvm-project/pull/71222 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits