Commit 2bf683a9 authored by dguyot's avatar dguyot
Browse files

Initial commit for parser

parent f48bac81
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <inttypes.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string_view>
int main(int argc, char** argv){
struct stat sfd;
int fd;
size_t size;
char* mmfile;
int i;
fd = open(argv[1], O_RDONLY);
fstat(fd,&sfd);
size = sfd.st_size;
mmfile = (char *)mmap(NULL, size, PROT_READ, MAP_PRIVATE | MAP_DENYWRITE, fd, 0);
close(fd);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment