From 2e854bcb40d535957b589ad02e3f280e00b47865 Mon Sep 17 00:00:00 2001 From: Richard Knight Date: Mon, 16 Aug 2021 02:56:49 +0100 Subject: pre strip down --- include/maketable.hpp | 9 +++++ include/pmparser.h | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 include/maketable.hpp create mode 100644 include/pmparser.h (limited to 'include') diff --git a/include/maketable.hpp b/include/maketable.hpp new file mode 100644 index 0000000..d4986dc --- /dev/null +++ b/include/maketable.hpp @@ -0,0 +1,9 @@ +#ifndef MAKETABLE_HPP +#define MAKETABLE_HPP + +#include + +int maketable(csnd::Csound* csound, int size, FUNC** table, int channels=1); + +#endif /* MAKETABLE_HPP */ + diff --git a/include/pmparser.h b/include/pmparser.h new file mode 100644 index 0000000..02089c7 --- /dev/null +++ b/include/pmparser.h @@ -0,0 +1,92 @@ +/* + @Author : ouadimjamal@gmail.com + @date : December 2015 + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. No representations are made about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + + */ + +#ifndef H_PMPARSER +#define H_PMPARSER +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//maximum line length in a procmaps file +#define PROCMAPS_LINE_MAX_LENGTH (PATH_MAX + 100) +/** + * procmaps_struct + * @desc hold all the information about an area in the process's VM + */ +typedef struct procmaps_struct{ + char* addr_start; //< start address of the area + char* addr_end; //< end address + unsigned long length; //< size of the range + + char perm[5]; //< permissions rwxp + short is_r; //< rewrote of perm with short flags + short is_w; + short is_x; + short is_p; + + long offset; //< offset + char dev[12]; //< dev major:minor + int inode; //< inode of the file that backs the area + + char pathname[600]; //< the path of the file that backs the area + //chained list + struct procmaps_struct* next; //