Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Commit

Permalink
Add I/O capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
jchristopherson committed Aug 7, 2020
1 parent f3cf52b commit 1976774
Show file tree
Hide file tree
Showing 9 changed files with 1,480 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ endif ()
message(STATUS "CMAKE_Fortran_COMPILER full path: " ${CMAKE_Fortran_COMPILER})
message(STATUS "Fortran compiler: " ${Fortran_COMPILER_NAME})

# C/C++ Compiler Directions - Windows Specific
# Necessary for COM support => REF: https://gist.github.com/armornick/106e1124995194af5c02
set(CMAKE_CXX_FLAGS_DEBUG "-DUNICODE -D_UNICODE -D_WIN32_WINNT=_WIN32_WINNT_VISTA -DNTDDI_VERSION=NTDDI_VISTA")
set(CMAKE_CXX_FLAGS_RELEASE "-DUNICODE -D_UNICODE -D_WIN32_WINNT=_WIN32_WINNT_VISTA -DNTDDI_VERSION=NTDDI_VISTA")


# Locate Dependencies
find_package(ferror 1.3.0)
# find_package(linalg 1.6.0)
Expand Down
20 changes: 20 additions & 0 deletions include/system_file_io.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef SYSTEM_FILE_IO_H_
#define SYSTEM_FILE_IO_H_

#include <stdbool.h>

#ifdef __cplusplus
extern "C" {
#endif

void split_file_path_c(const char *path, char *drive, char *dir, char *fname,
char *ext);

bool get_directory_contents_c(const char *dir, int nbuffers, int bufferSize,
char **fnames, int *nnames, int *nameLengths, char **dirnames, int *ndir,
int *dirLengths);

#ifdef __cplusplus
}
#endif
#endif // SYSTEM_FILE_IO_H_
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ set(fcore_sources
file_io_reader.f90
file_io_endian.f90
file_io_binary.f90
system_file_io.cpp
file_io_path.f90
)

# Build the library
Expand Down
Loading

0 comments on commit 1976774

Please sign in to comment.