Skip to content

Commit

Permalink
Merge pull request #10 from VladlenPopolitov/fix_tests
Browse files Browse the repository at this point in the history
Version 0.10.0 published
  • Loading branch information
VladlenPopolitov authored Aug 5, 2023
2 parents 6415190 + 56708ff commit 1baec71
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 16 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 3.13.4)
project(mimetic)

set(MIMETIC_MAJOR_VERSION 0)
set(MIMETIC_MINOR_VERSION 9)
set(MIMETIC_PATCH_VERSION 8)
set(MIMETIC_MINOR_VERSION 10)
set(MIMETIC_PATCH_VERSION 0)
set(MIMETIC_VERSION
${MIMETIC_MAJOR_VERSION}.${MIMETIC_MINOR_VERSION}.${MIMETIC_PATCH_VERSION})
set(MIMETIC_VERSION_STRING "${MIMETIC_VERSION}")
Expand Down
4 changes: 3 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

05.08.2023, 0.10.0
- CMake configuration files added
- all tests run on Windows successfully
17.06.2014, 0.9.8
- clang/gcc compilation fixes in tokenizer.h

Expand Down
2 changes: 1 addition & 1 deletion configure
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3109,7 +3109,7 @@ fi

# Define the identity of the package.
PACKAGE=mimetic
VERSION=0.9.8
VERSION=0.10.0


cat >>confdefs.h <<_ACEOF
Expand Down
2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AC_INIT(mimetic/mimetic.h)
AC_CANONICAL_SYSTEM
AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE(mimetic,0.9.8)
AM_INIT_AUTOMAKE(mimetic,0.10.0)
AM_CONFIG_HEADER(mimetic/config.h)

dnl Checks for programs.
Expand Down
2 changes: 1 addition & 1 deletion mimetic/config_win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define HAVE_SYS_TYPES_H 1

#define PACKAGE "mimetic"
#define VERSION "0.9.7"
#define VERSION "0.10.0"


typedef __int16 int16_t;
Expand Down
20 changes: 11 additions & 9 deletions mimetic/os/stdfile.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace mimetic


StdFile::StdFile()
: m_stated(false), m_fd(-1)
: m_stated(false), m_fd(-1), m_st{}
{
}

Expand All @@ -56,7 +56,7 @@ void StdFile::open(int mode)

StdFile::~StdFile()
{
if(m_fd)
if(m_fd>=0)
close();
}

Expand All @@ -72,11 +72,13 @@ StdFile::iterator StdFile::end()

uint StdFile::read(char* buf, int bufsz)
{
int r;
do
{
r = ::read(m_fd, buf, bufsz);
} while(r < 0 && errno == EINTR);
int r = 0;
if (m_fd >= 0) {
do
{
r = ::read(m_fd, buf, bufsz);
} while (r < 0 && errno == EINTR);
}
return r;
}

Expand All @@ -92,8 +94,8 @@ bool StdFile::stat()

void StdFile::close()
{
while(::close(m_fd) < 0 && errno == EINTR)
;
if(m_fd>=0)
::close(m_fd);
m_fd = -1;
}

Expand Down
8 changes: 8 additions & 0 deletions mimetic/os/stdfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,18 @@ struct StdFile: public FileOp
{
typedef ifile_iterator iterator;
StdFile();
#ifdef O_BINARY
StdFile(const std::string&, int mode = (O_RDONLY | O_BINARY));
#else
StdFile(const std::string&, int mode = O_RDONLY);
#endif
~StdFile();
operator bool() const;
#ifdef O_BINARY
void open(const std::string&, int mode = (O_RDONLY | O_BINARY));
#else
void open(const std::string&, int mode = O_RDONLY);
#endif
void close();
uint read(char*, int);

Expand Down
2 changes: 1 addition & 1 deletion test/cutee.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ typedef unsigned int uint;
mEvt->enterFunction(*this); \
mFuncExitCode = 0; \
funcname(); \
if(mFuncExitCode) mFailed++; \
if(mFuncExitCode) {std::cout<<"Function failed " #funcname <<std::endl; mFailed++;} \
mEvt->leaveFunction(*this, mFuncExitCode == 0); \
} \
void funcname()
Expand Down

0 comments on commit 1baec71

Please sign in to comment.