📝 change CRLF to LF
This commit is contained in:
parent
476fbdb859
commit
d42e4a5897
|
@ -1,5 +1,11 @@
|
||||||
#include "io_lib.h"
|
#include "io_lib.h"
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define F_OK 0 // fuck msc
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
namespace nasal {
|
namespace nasal {
|
||||||
|
|
||||||
const auto file_type_name = "file";
|
const auto file_type_name = "file";
|
||||||
|
|
|
@ -4,18 +4,12 @@
|
||||||
#include "nasal_gc.h"
|
#include "nasal_gc.h"
|
||||||
#include "nasal_builtin.h"
|
#include "nasal_builtin.h"
|
||||||
|
|
||||||
#include <sys/stat.h>
|
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else
|
#else
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define F_OK 0 // fuck msc
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace nasal {
|
namespace nasal {
|
||||||
|
|
||||||
void filehandle_destructor(void*);
|
void filehandle_destructor(void*);
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define F_OK 0 // fuck msc
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace nasal {
|
namespace nasal {
|
||||||
|
|
||||||
linker::linker(): show_path_flag(false), library_loaded(false), this_file("") {
|
linker::linker(): show_path_flag(false), library_loaded(false), this_file("") {
|
||||||
|
|
|
@ -8,10 +8,6 @@
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define F_OK 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "nasal.h"
|
#include "nasal.h"
|
||||||
#include "nasal_ast.h"
|
#include "nasal_ast.h"
|
||||||
#include "nasal_lexer.h"
|
#include "nasal_lexer.h"
|
||||||
|
|
|
@ -76,6 +76,9 @@ void lexer::open(const std::string& file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// check file exsits and it is a regular file
|
// check file exsits and it is a regular file
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define S_ISREG(m) (((m)&0xF000)==0x8000)
|
||||||
|
#endif
|
||||||
struct stat buffer;
|
struct stat buffer;
|
||||||
if (stat(file.c_str(), &buffer)==0 && !S_ISREG(buffer.st_mode)) {
|
if (stat(file.c_str(), &buffer)==0 && !S_ISREG(buffer.st_mode)) {
|
||||||
err.err("lexer", "<"+file+"> is not a regular file");
|
err.err("lexer", "<"+file+"> is not a regular file");
|
||||||
|
|
|
@ -15,10 +15,6 @@
|
||||||
#include "nasal.h"
|
#include "nasal.h"
|
||||||
#include "nasal_err.h"
|
#include "nasal_err.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define S_ISREG(m) (((m)&0xF000)==0x8000)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace nasal {
|
namespace nasal {
|
||||||
|
|
||||||
enum class tok:u32 {
|
enum class tok:u32 {
|
||||||
|
|
Loading…
Reference in New Issue