diff --git a/src/addpart.h b/src/addpart.h index cae5f1c8..70d8d31c 100644 --- a/src/addpart.h +++ b/src/addpart.h @@ -20,6 +20,8 @@ */ +#ifndef _ADDPART_H +#define _ADDPART_H /*@ @ requires \valid(disk); @ requires list_part == \null || \valid_read(list_part); @@ -29,3 +31,4 @@ @ ensures valid_read_string(*current_cmd); @*/ list_part_t *add_partition_cli(disk_t *disk, list_part_t *list_part, char **current_cmd); +#endif diff --git a/src/addpartn.h b/src/addpartn.h index e0638c14..30acbf6e 100644 --- a/src/addpartn.h +++ b/src/addpartn.h @@ -20,4 +20,15 @@ */ +#ifndef _ADDPARTN_H +#define _ADDPARTN_H +#ifdef __cplusplus +extern "C" { +#endif + list_part_t *add_partition_ncurses(disk_t *disk, list_part_t *list_part); + +#ifdef __cplusplus +} /* closing brace for extern "C" */ +#endif +#endif diff --git a/src/adv.h b/src/adv.h index b62033ea..1835a8f8 100644 --- a/src/adv.h +++ b/src/adv.h @@ -19,6 +19,9 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifndef _ADV_H +#define _ADV_H #ifdef __cplusplus extern "C" { #endif @@ -39,3 +42,4 @@ int is_part_linux(const partition_t *partition); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/analyse.h b/src/analyse.h index aaf10024..782076b9 100644 --- a/src/analyse.h +++ b/src/analyse.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _ANALYSE_H +#define _ANALYSE_H #ifdef __cplusplus extern "C" { #endif @@ -40,3 +42,4 @@ int check_linux(disk_t *disk, partition_t *partition, const int verbose); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/askloc.h b/src/askloc.h index 5dcc8d40..bf50bc74 100644 --- a/src/askloc.h +++ b/src/askloc.h @@ -19,6 +19,9 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifndef _ASKLOC_H +#define _ASKLOC_H #ifdef __cplusplus extern "C" { #endif @@ -33,3 +36,4 @@ char *get_default_location(void); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/autoset.h b/src/autoset.h index a5b4a562..9dccbeb2 100644 --- a/src/autoset.h +++ b/src/autoset.h @@ -19,9 +19,19 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _AUTOSET_H +#define _AUTOSET_H +#ifdef __cplusplus +extern "C" { +#endif + /*@ @ requires \valid(disk_car); @ assigns disk_car->unit; @*/ void autoset_unit(disk_t *disk_car); +#ifdef __cplusplus +} /* closing brace for extern "C" */ +#endif +#endif diff --git a/src/bfs.h b/src/bfs.h index 7117d4c5..f631fcc4 100644 --- a/src/bfs.h +++ b/src/bfs.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _BFS_H +#define _BFS_H #ifdef __cplusplus extern "C" { #endif @@ -101,3 +103,4 @@ int recover_BeFS(const disk_t *disk_car, const struct disk_super_block *beos_blo #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/btrfs.h b/src/btrfs.h index 83ad5646..dad5511f 100644 --- a/src/btrfs.h +++ b/src/btrfs.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _BTRFS_H +#define _BTRFS_H #ifdef __cplusplus extern "C" { #endif @@ -144,3 +146,4 @@ int recover_btrfs(const disk_t *disk_car, const struct btrfs_super_block *sb,par #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/chgarch.h b/src/chgarch.h index e1b459e0..a6892db1 100644 --- a/src/chgarch.h +++ b/src/chgarch.h @@ -20,6 +20,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _CHGARCH_H +#define _CHGARCH_H #ifdef __cplusplus extern "C" { #endif @@ -34,3 +36,4 @@ int change_arch_type_cli(disk_t *disk, const int verbose, char**current_cmd); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/chgarchn.h b/src/chgarchn.h index 1088079f..d9c262db 100644 --- a/src/chgarchn.h +++ b/src/chgarchn.h @@ -20,6 +20,8 @@ */ +#ifndef _CHGARCHN_H +#define _CHGARCHN_H #ifdef __cplusplus extern "C" { #endif @@ -29,3 +31,4 @@ int change_arch_type_ncurses(disk_t *disk_car, const int verbose); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/chgtype.h b/src/chgtype.h index 79043970..668cf7fb 100644 --- a/src/chgtype.h +++ b/src/chgtype.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _CHGTYPE_H +#define _CHGTYPE_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ void change_part_type_cli(const disk_t *disk_car,partition_t *partition, char ** #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/chgtypen.h b/src/chgtypen.h index e2912742..ef9f4180 100644 --- a/src/chgtypen.h +++ b/src/chgtypen.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _CHGTYPEN_H +#define _CHGTYPEN_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ void change_part_type_ncurses(const disk_t *disk, partition_t *partition); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/cramfs.h b/src/cramfs.h index 4b9b57fc..dc126957 100644 --- a/src/cramfs.h +++ b/src/cramfs.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _CRAMFS_H +#define _CRAMFS_H #ifdef __cplusplus extern "C" { #endif @@ -88,3 +90,4 @@ int recover_cramfs(const disk_t *disk_car, const struct cramfs_super *sb, partit #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/crc.h b/src/crc.h index 846fa14e..50d651d4 100644 --- a/src/crc.h +++ b/src/crc.h @@ -20,6 +20,8 @@ */ +#ifndef _CRC_H +#define _CRC_H #ifdef __cplusplus extern "C" { #endif @@ -38,3 +40,4 @@ unsigned int get_crc32(const void *s, const unsigned int len, const uint32_t see #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/dimage.h b/src/dimage.h index 52c48c12..ac304d24 100644 --- a/src/dimage.h +++ b/src/dimage.h @@ -19,10 +19,15 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _DIMAGE_H +#define _DIMAGE_H #ifdef __cplusplus extern "C" { #endif + int disk_image(disk_t *disk_car, const partition_t *partition, const char *image_dd); + #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/dirpart.h b/src/dirpart.h index f8c31af6..a46ae3ea 100644 --- a/src/dirpart.h +++ b/src/dirpart.h @@ -19,12 +19,16 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _DIRPART_H +#define _DIRPART_H #ifdef __cplusplus extern "C" { #endif + #include "dir.h" dir_partition_t dir_partition(disk_t *disk_car, const partition_t *partition, const int verbose, const int expert, char **current_cmd); + #ifdef __cplusplus } /* closing brace for extern "C" */ #endif - +#endif diff --git a/src/diskacc.h b/src/diskacc.h index 9f2ac3da..28a1f348 100644 --- a/src/diskacc.h +++ b/src/diskacc.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _DISKACC_H +#define _DISKACC_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int interface_check_disk_access(disk_t *disk_car, char **current_cmd); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/diskcapa.h b/src/diskcapa.h index b1409911..b63afdcd 100644 --- a/src/diskcapa.h +++ b/src/diskcapa.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _DISKCAPA_H +#define _DISKCAPA_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int interface_check_disk_capacity(disk_t *disk_car); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/edit.h b/src/edit.h index d7326b73..5313a7b4 100644 --- a/src/edit.h +++ b/src/edit.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _EDIT_H +#define _EDIT_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ void interface_editor(disk_t *disk_car); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/ewf.h b/src/ewf.h index 16d2bad2..add3b54a 100644 --- a/src/ewf.h +++ b/src/ewf.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _EWF_H +#define _EWF_H #ifdef __cplusplus extern "C" { #endif @@ -35,3 +37,4 @@ const char*td_ewf_version(void); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/exfat.h b/src/exfat.h index 0037f778..fb39e9e0 100644 --- a/src/exfat.h +++ b/src/exfat.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _EXFAT_H +#define _EXFAT_H #ifdef __cplusplus extern "C" { #endif @@ -101,3 +103,4 @@ int test_exFAT(const struct exfat_super_block *exfat_header); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/exfat_dir.h b/src/exfat_dir.h index 2e57f398..9ea2b137 100644 --- a/src/exfat_dir.h +++ b/src/exfat_dir.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _EXFAT_DIR_H +#define _EXFAT_DIR_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ dir_partition_t dir_partition_exfat_init(disk_t *disk_car, const partition_t *pa #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/exfatp.h b/src/exfatp.h index 142b3399..05d0d215 100644 --- a/src/exfatp.h +++ b/src/exfatp.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _EXFATP_H +#define _EXFATP_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ unsigned int exfat_remove_used_space(disk_t *disk, const partition_t *partition, #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/ext2.h b/src/ext2.h index 47ef0a72..c8dba7af 100644 --- a/src/ext2.h +++ b/src/ext2.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _EXT2_H +#define _EXT2_H #ifdef __cplusplus extern "C" { #endif @@ -207,3 +209,4 @@ int recover_EXT2(const disk_t *disk_car, const struct ext2_super_block *sb, part #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/ext2_common.h b/src/ext2_common.h index a5091ae9..d483309d 100644 --- a/src/ext2_common.h +++ b/src/ext2_common.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef EXT2_COMMON_H +#define EXT2_COMMON_H #ifdef __cplusplus extern "C" { #endif @@ -30,3 +32,4 @@ int test_EXT2(const struct ext2_super_block *sb, const partition_t *partition); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/ext2_dir.h b/src/ext2_dir.h index cfb2cf5d..f743d157 100644 --- a/src/ext2_dir.h +++ b/src/ext2_dir.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _EXT2_DIR_H +#define _EXT2_DIR_H #ifdef __cplusplus extern "C" { #endif @@ -29,3 +31,4 @@ const char*td_ext2fs_version(void); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/ext2_inc.h b/src/ext2_inc.h index e3cf9f57..d1cb0860 100644 --- a/src/ext2_inc.h +++ b/src/ext2_inc.h @@ -19,10 +19,17 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _EXT2_INC_H +#define _EXT2_INC_H + #if defined(__FRAMAC__) || defined(MAIN_photorec) #undef HAVE_LIBEXT2FS #endif +#ifdef __cplusplus +extern "C" { +#endif + #if defined(HAVE_LIBEXT2FS) struct ext2_dir_struct { file_info_t *dir_list; @@ -31,3 +38,8 @@ struct ext2_dir_struct { dir_data_t *dir_data; }; #endif + +#ifdef __cplusplus +} /* closing brace for extern "C" */ +#endif +#endif diff --git a/src/ext2_sb.h b/src/ext2_sb.h index b527b8e9..3b02b341 100644 --- a/src/ext2_sb.h +++ b/src/ext2_sb.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _EXT2_SB_H +#define _EXT2_SB_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int interface_superblock(disk_t *disk_car, const list_part_t *list_part, char**c #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/ext2_sbn.h b/src/ext2_sbn.h index a90da20a..f9dfe5b6 100644 --- a/src/ext2_sbn.h +++ b/src/ext2_sbn.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _EXT2_SBN_H +#define _EXT2_SBN_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ list_part_t *search_superblock(disk_t *disk_car, partition_t *partition, const i #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/ext2grp.h b/src/ext2grp.h index ed5e9db5..9b5bffd1 100644 --- a/src/ext2grp.h +++ b/src/ext2grp.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _EXT2GRP_H +#define _EXT2GRP_H #ifdef __cplusplus extern "C" { #endif @@ -29,3 +31,4 @@ unsigned int ext2_fix_inode(alloc_data_t *list_search_space, disk_t *disk, const #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/ext2p.h b/src/ext2p.h index ee3c3bfa..b078ee05 100644 --- a/src/ext2p.h +++ b/src/ext2p.h @@ -19,12 +19,17 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _EXT2P_H +#define _EXT2P_H #ifdef __cplusplus extern "C" { #endif + #ifdef HAVE_LIBEXT2FS unsigned int ext2_remove_used_space(disk_t *disk, const partition_t *partition, alloc_data_t *list_search_space); #endif + #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/f2fs.h b/src/f2fs.h index e1d7086b..6cf9287f 100644 --- a/src/f2fs.h +++ b/src/f2fs.h @@ -19,7 +19,17 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _F2FS_H +#define _F2FS_H +#ifdef __cplusplus +extern "C" { +#endif int check_f2fs(disk_t *disk, partition_t *partition); int test_f2fs(const struct f2fs_super_block *hdr); int recover_f2fs(const disk_t *disk, const struct f2fs_super_block *hdr, partition_t *partition); + +#ifdef __cplusplus +} /* closing brace for extern "C" */ +#endif +#endif diff --git a/src/fat1x.h b/src/fat1x.h index 5b919002..1c933ca0 100644 --- a/src/fat1x.h +++ b/src/fat1x.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _FAT1X_H +#define _FAT1X_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int fat1x_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/fat32.h b/src/fat32.h index d75b917e..05ba043d 100644 --- a/src/fat32.h +++ b/src/fat32.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _FAT32_H +#define _FAT32_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int fat32_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/fat_dir.h b/src/fat_dir.h index c6cd24be..af2ac030 100644 --- a/src/fat_dir.h +++ b/src/fat_dir.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _FAT_DIR_H +#define _FAT_DIR_H #ifdef __cplusplus extern "C" { #endif @@ -30,3 +32,4 @@ dir_partition_t dir_partition_fat_init(disk_t *disk_car, const partition_t *part #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/fatp.h b/src/fatp.h index de68f177..2b62af0e 100644 --- a/src/fatp.h +++ b/src/fatp.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _FATP_H +#define _FATP_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ unsigned int fat_remove_used_space(disk_t *disk_car,const partition_t *partition #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/fatx.h b/src/fatx.h index 36f60c8f..1fb3d72c 100644 --- a/src/fatx.h +++ b/src/fatx.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _FATX_H +#define _FATX_H #ifdef __cplusplus extern "C" { #endif @@ -38,3 +40,4 @@ int recover_FATX(const struct disk_fatx *fatx_block, partition_t *partition); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/file_doc.h b/src/file_doc.h index 05f0c07b..2c5e0ba6 100644 --- a/src/file_doc.h +++ b/src/file_doc.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _FILE_DOC_H +#define _FILE_DOC_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ void file_check_doc_aux(file_recovery_t *file_recovery, const uint64_t offset); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/file_found.h b/src/file_found.h index 9634783a..e03f3194 100644 --- a/src/file_found.h +++ b/src/file_found.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _FILE_FOUND_H +#define _FILE_FOUND_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ alloc_data_t *file_found(alloc_data_t *current_search_space, const uint64_t offs #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/file_gz.h b/src/file_gz.h index cb549161..5f22459d 100644 --- a/src/file_gz.h +++ b/src/file_gz.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _FILE_GZ_H +#define _FILE_GZ_H #ifdef __cplusplus extern "C" { #endif @@ -28,4 +30,4 @@ const char*td_zlib_version(void); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif - +#endif diff --git a/src/file_jpg.h b/src/file_jpg.h index 79d03721..d2093a8c 100644 --- a/src/file_jpg.h +++ b/src/file_jpg.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _FILE_JPG_H +#define _FILE_JPG_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ const char*td_jpeg_version(void); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/file_tar.h b/src/file_tar.h index fd078a2d..18528a69 100644 --- a/src/file_tar.h +++ b/src/file_tar.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _FILE_TAR_H +#define _FILE_TAR_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int header_check_tar(const unsigned char *buffer, const unsigned int buffer_size #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/file_txt.h b/src/file_txt.h index b1a66417..20f1de55 100644 --- a/src/file_txt.h +++ b/src/file_txt.h @@ -19,6 +19,12 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _FILE_TXT_H +#define _FILE_TXT_H +#ifdef __cplusplus +extern "C" { +#endif + /*@ @ requires buf_len> 0; @ requires \valid_read(buffer+(0..buf_len-1)); @@ -26,3 +32,7 @@ @ assigns \nothing; @*/ int UTFsize(const unsigned char *buffer, const unsigned int buf_len); +#ifdef __cplusplus +} /* closing brace for extern "C" */ +#endif +#endif diff --git a/src/geometry.h b/src/geometry.h index 5534241f..1cf32e7b 100644 --- a/src/geometry.h +++ b/src/geometry.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _GEOMETRY_H +#define _GEOMETRY_H #ifdef __cplusplus extern "C" { #endif @@ -51,3 +53,4 @@ int change_geometry_cli(disk_t *disk, char **current_cmd); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/geometryn.h b/src/geometryn.h index 4440aa93..df13c055 100644 --- a/src/geometryn.h +++ b/src/geometryn.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _GEOMETRYN_H +#define _GEOMETRYN_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int change_geometry_ncurses(disk_t *disk); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/gfs2.h b/src/gfs2.h index 20d73024..7e439bfd 100644 --- a/src/gfs2.h +++ b/src/gfs2.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _GFS2_H +#define _GFS2_H #ifdef __cplusplus extern "C" { #endif @@ -84,3 +86,4 @@ int recover_gfs2(const disk_t *disk_car, const struct gfs2_sb *sb, partition_t * #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/godmode.h b/src/godmode.h index d93081bf..0527b150 100644 --- a/src/godmode.h +++ b/src/godmode.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _GODMODE_H +#define _GODMODE_H #ifdef __cplusplus extern "C" { #endif @@ -30,3 +32,4 @@ void only_one_bootable( list_part_t *list_part, const list_part_t *part_boot); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/guid_cmp.h b/src/guid_cmp.h index 4c0aece7..aa80b04b 100644 --- a/src/guid_cmp.h +++ b/src/guid_cmp.h @@ -19,6 +19,11 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _GUID_CMP_H +#define _GUID_CMP_H +#ifdef __cplusplus +extern "C" { +#endif /*@ @ assigns \nothing; @@ -28,3 +33,7 @@ static inline int guid_cmp (const efi_guid_t left, const efi_guid_t right) return memcmp(&left, &right, sizeof(efi_guid_t)); } +#ifdef __cplusplus +} /* closing brace for extern "C" */ +#endif +#endif diff --git a/src/guid_cpy.h b/src/guid_cpy.h index c68a0875..ae8c04e7 100644 --- a/src/guid_cpy.h +++ b/src/guid_cpy.h @@ -20,6 +20,8 @@ */ +#ifndef _GUID_CPY_H +#define _GUID_CPY_H /*@ requires \valid(dst); @ requires \valid_read(src); @ requires separation: @@ -32,5 +34,4 @@ static inline void guid_cpy (efi_guid_t *dst, const efi_guid_t *src) { memcpy(dst, src, sizeof(efi_guid_t)); } - - +#endif diff --git a/src/hdcache.h b/src/hdcache.h index c32ad3a7..c2d9b238 100644 --- a/src/hdcache.h +++ b/src/hdcache.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _HDCACHE_H +#define _HDCACHE_H #ifdef __cplusplus extern "C" { #endif @@ -32,3 +34,4 @@ disk_t *new_diskcache(disk_t *disk_car, const unsigned int cache_size_min); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/hidden.h b/src/hidden.h index fe6e9f5d..4d302bdc 100644 --- a/src/hidden.h +++ b/src/hidden.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _HIDDEN_H +#define _HIDDEN_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int is_hpa_or_dco(const disk_t *disk); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/hiddenn.h b/src/hiddenn.h index 5bf15730..6b2b0f11 100644 --- a/src/hiddenn.h +++ b/src/hiddenn.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _HIDDENN_H +#define _HIDDENN_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int interface_check_hidden_ncurses(disk_t *disk, const int hpa_dco); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/hpa_dco.h b/src/hpa_dco.h index bb3b8215..783e46e6 100644 --- a/src/hpa_dco.h +++ b/src/hpa_dco.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _HPA_DCO_H +#define _HPA_DCO_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ void disk_get_hpa_dco(const int hd_h, disk_t *disk_car); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/intrf.h b/src/intrf.h index e6756795..d4ba7c36 100644 --- a/src/intrf.h +++ b/src/intrf.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _INTRF_H +#define _INTRF_H #ifdef __cplusplus extern "C" { #endif @@ -79,3 +81,4 @@ int get_partition_status(const partition_t *partition); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/intrface.h b/src/intrface.h index 78c8f90e..cc860075 100644 --- a/src/intrface.h +++ b/src/intrface.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _INTRFACE_H +#define _INTRFACE_H #ifdef __cplusplus extern "C" { #endif @@ -29,3 +31,4 @@ void interface_list(disk_t *disk_car, const int verbose, const int saveheader, c #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/intrfn.h b/src/intrfn.h index 6c35e904..064fadef 100644 --- a/src/intrfn.h +++ b/src/intrfn.h @@ -20,6 +20,8 @@ */ +#ifndef _INTRFN_H +#define _INTRFN_H #ifdef __cplusplus extern "C" { #endif @@ -73,3 +75,4 @@ void display_message(const char*msg); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/io_redir.h b/src/io_redir.h index 2d93bd35..7c83d237 100644 --- a/src/io_redir.h +++ b/src/io_redir.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _IO_REDIR_H +#define _IO_REDIR_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int io_redir_del_redir(disk_t *disk_car, uint64_t org_offset); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/iso.h b/src/iso.h index 674352b1..38d96847 100644 --- a/src/iso.h +++ b/src/iso.h @@ -19,6 +19,9 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifndef _ISO_H +#define _ISO_H #ifdef __cplusplus extern "C" { #endif @@ -38,3 +41,4 @@ int recover_ISO(const struct iso_primary_descriptor *iso, partition_t *partition #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/jfs.h b/src/jfs.h index 1ab55894..16244bf5 100644 --- a/src/jfs.h +++ b/src/jfs.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _JFS_H +#define _JFS_H #ifdef __cplusplus extern "C" { #endif @@ -44,3 +46,4 @@ int recover_JFS(const disk_t *disk_car, const struct jfs_superblock *sb, partiti #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/list_sort.h b/src/list_sort.h index 24913dd4..495a2761 100644 --- a/src/list_sort.h +++ b/src/list_sort.h @@ -17,6 +17,16 @@ with this program; if not, write the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _LIST_SORT_H +#define _LIST_SORT_H +#ifdef __cplusplus +extern "C" { +#endif void td_list_sort(struct td_list_head *head, int (*cmp)(const struct td_list_head *a, const struct td_list_head *b)); + +#ifdef __cplusplus +} /* closing brace for extern "C" */ +#endif +#endif diff --git a/src/luks.h b/src/luks.h index 514c7d7b..0274f619 100644 --- a/src/luks.h +++ b/src/luks.h @@ -20,6 +20,8 @@ LUKS on-disk-format: http://luks.endorphin.org/spec */ +#ifndef _LUKS_H +#define _LUKS_H #ifdef __cplusplus extern "C" { #endif @@ -62,3 +64,4 @@ int recover_LUKS(const disk_t *disk_car, const struct luks_phdr *sb,partition_t #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/memmem.h b/src/memmem.h index caa68739..9cf5f222 100644 --- a/src/memmem.h +++ b/src/memmem.h @@ -21,6 +21,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _MEMMEM_H +#define _MEMMEM_H /*@ @ requires \valid_read((const char *)haystack+(0..haystack_len-1)); @@ -53,3 +55,4 @@ static inline const void *td_memmem(const void *haystack, const unsigned int hay return (const void *) begin; return NULL; } +#endif diff --git a/src/misc.h b/src/misc.h index e2f23ea6..17124bcf 100644 --- a/src/misc.h +++ b/src/misc.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _MISC_H +#define _MISC_H #ifdef __cplusplus extern "C" { #endif @@ -37,3 +39,4 @@ const char *get_compilation_date(void); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/netware.h b/src/netware.h index 24165625..939a8d32 100644 --- a/src/netware.h +++ b/src/netware.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _NETWARE_H +#define _NETWARE_H #ifdef __cplusplus extern "C" { #endif @@ -50,3 +52,4 @@ int recover_netware(const disk_t *disk_car, const struct disk_netware *netware_b #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/next.h b/src/next.h index f7af29ca..81dc3440 100644 --- a/src/next.h +++ b/src/next.h @@ -1,3 +1,26 @@ +/* + + File: next.h + + Copyright (C) 2020 Christophe GRENIER + + This software is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write the Free Software Foundation, Inc., 51 + Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + */ +#ifndef _NEXT_H +#define _NEXT_H #ifdef __cplusplus extern "C" { #endif @@ -8,3 +31,4 @@ uint64_t search_location_update(const uint64_t location); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/nodisk.h b/src/nodisk.h index 71f899d8..64e59997 100644 --- a/src/nodisk.h +++ b/src/nodisk.h @@ -19,11 +19,15 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _NODISK_H +#define _NODISK_H #ifdef __cplusplus extern "C" { #endif + int intrf_no_disk_ncurses(const char *prog_name); + #ifdef __cplusplus } /* closing brace for extern "C" */ #endif - +#endif diff --git a/src/ntfs.h b/src/ntfs.h index faaa1acd..d03e3c6b 100644 --- a/src/ntfs.h +++ b/src/ntfs.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _NTFS_H +#define _NTFS_H #ifdef __cplusplus extern "C" { #endif @@ -261,3 +263,4 @@ long int ntfs_get_first_rl_element(const ntfs_attribnonresident *attrnr, const c #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/ntfs_dir.h b/src/ntfs_dir.h index 06abcb5c..a4a4757c 100644 --- a/src/ntfs_dir.h +++ b/src/ntfs_dir.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _NTFS_DIR_H +#define _NTFS_DIR_H #ifdef __cplusplus extern "C" { #endif @@ -29,3 +31,4 @@ const char*td_ntfs_version(void); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/ntfs_fix.h b/src/ntfs_fix.h index 057efc15..cb69c15b 100644 --- a/src/ntfs_fix.h +++ b/src/ntfs_fix.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _NTFS_FIX_H +#define _NTFS_FIX_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int repair_MFT(disk_t *disk_car, partition_t *partition, const int verbose, cons #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/ntfs_inc.h b/src/ntfs_inc.h index 2f37110c..eaf62093 100644 --- a/src/ntfs_inc.h +++ b/src/ntfs_inc.h @@ -19,6 +19,12 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _NTFS_INC_H +#define _NTFS_INC_H +#ifdef __cplusplus +extern "C" { +#endif + #if defined(HAVE_LIBNTFS) || defined(HAVE_LIBNTFS3G) struct ntfs_dir_struct { file_info_t *dir_list; @@ -31,3 +37,8 @@ struct ntfs_dir_struct { #endif }; #endif + +#ifdef __cplusplus +} /* closing brace for extern "C" */ +#endif +#endif diff --git a/src/ntfs_udl.h b/src/ntfs_udl.h index c3df9391..5dc9afa7 100644 --- a/src/ntfs_udl.h +++ b/src/ntfs_udl.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _NTFS_UDL_H +#define _NTFS_UDL_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int ntfs_undelete_part(disk_t *disk_car, const partition_t *partition, const int #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/ntfs_utl.h b/src/ntfs_utl.h index e19c9279..a6983f98 100644 --- a/src/ntfs_utl.h +++ b/src/ntfs_utl.h @@ -19,6 +19,11 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifdef __FRAMAC__ +#undef HAVE_LIBNTFS +#undef HAVE_LIBNTFS3G +#endif + #if defined(HAVE_LIBNTFS) || defined(HAVE_LIBNTFS3G) #ifdef __cplusplus extern "C" { diff --git a/src/ntfsp.h b/src/ntfsp.h index 35f10fc6..c63698f0 100644 --- a/src/ntfsp.h +++ b/src/ntfsp.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _NTFSP_H +#define _NTFSP_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ unsigned int ntfs_remove_used_space(disk_t *disk_car,const partition_t *partitio #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/partauto.h b/src/partauto.h index 7d51838b..ee2a7eeb 100644 --- a/src/partauto.h +++ b/src/partauto.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PARTAUTO_H +#define _PARTAUTO_H #ifdef __cplusplus extern "C" { #endif @@ -33,3 +35,4 @@ void autodetect_arch(disk_t *disk, const arch_fnct_t *arch); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/partgptn.h b/src/partgptn.h index 626344e5..c63e658c 100644 --- a/src/partgptn.h +++ b/src/partgptn.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PARTGPTN_H +#define _PARTGPTN_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ list_part_t *add_partition_gpt_ncurses(disk_t *disk, list_part_t *list_part); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/parthumax.h b/src/parthumax.h index c6fcddfd..2787e529 100644 --- a/src/parthumax.h +++ b/src/parthumax.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PARTHUMAX_H +#define _PARTHUMAX_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ list_part_t *add_partition_humax_cli(const disk_t *disk_car,list_part_t *list_pa #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/parti386.h b/src/parti386.h index c1f5e2a3..2a52a8ec 100644 --- a/src/parti386.h +++ b/src/parti386.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PARTI386_H +#define _PARTI386_H #ifdef __cplusplus extern "C" { #endif @@ -51,3 +53,4 @@ int recover_i386_logical(disk_t *disk, const unsigned char *buffer, partition_t #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/parti386n.h b/src/parti386n.h index eb01fcb5..6315aecc 100644 --- a/src/parti386n.h +++ b/src/parti386n.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PARTI386N_H +#define _PARTI386N_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ list_part_t *add_partition_i386_ncurses(disk_t *disk, list_part_t *list_part); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/partmac.h b/src/partmac.h index 156f2f5a..88e8baf9 100644 --- a/src/partmac.h +++ b/src/partmac.h @@ -20,6 +20,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PARTMAC_H +#define _PARTMAC_H #ifdef __cplusplus extern "C" { #endif @@ -98,3 +100,4 @@ list_part_t *add_partition_mac_cli(disk_t *disk_car,list_part_t *list_part, char #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/partmacn.h b/src/partmacn.h index 43eefec0..802629cc 100644 --- a/src/partmacn.h +++ b/src/partmacn.h @@ -20,6 +20,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PARTMACN_H +#define _PARTMACN_H #ifdef __cplusplus extern "C" { #endif @@ -30,3 +32,4 @@ list_part_t *add_partition_mac_ncurses(disk_t *disk, list_part_t *list_part); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/partsun.h b/src/partsun.h index b25ba66d..c649d0f5 100644 --- a/src/partsun.h +++ b/src/partsun.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PARTSUN_H +#define _PARTSUN_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ list_part_t *add_partition_sun_cli(const disk_t *disk_car,list_part_t *list_part #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/partsunn.h b/src/partsunn.h index ecb43567..d161a578 100644 --- a/src/partsunn.h +++ b/src/partsunn.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PARTSUNN_H +#define _PARTSUNN_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ list_part_t *add_partition_sun_ncurses(disk_t *disk, list_part_t *list_part); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/partxbox.h b/src/partxbox.h index 1db6f1ef..f8972e32 100644 --- a/src/partxbox.h +++ b/src/partxbox.h @@ -20,6 +20,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PARTXBOX_H +#define _PARTXBOX_H #ifdef __cplusplus extern "C" { #endif @@ -36,3 +38,4 @@ list_part_t *add_partition_xbox_cli(const disk_t *disk_car,list_part_t *list_par #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/partxboxn.h b/src/partxboxn.h index 84b29ac7..61ec166f 100644 --- a/src/partxboxn.h +++ b/src/partxboxn.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PARTXBOXN_H +#define _PARTXBOXN_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ list_part_t *add_partition_xbox_ncurses(disk_t *disk, list_part_t *list_part); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/pblocksize.h b/src/pblocksize.h index cf7b2f69..935a22c8 100644 --- a/src/pblocksize.h +++ b/src/pblocksize.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PBLOCKSIZE_H +#define _PBLOCKSIZE_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ void menu_choose_blocksize(unsigned int *blocksize, uint64_t *offset, const unsi #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/pdisksel.h b/src/pdisksel.h index 81a90285..b62049b9 100644 --- a/src/pdisksel.h +++ b/src/pdisksel.h @@ -19,7 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - +#ifndef _PDISKSEL_H +#define _PDISKSEL_H #ifdef __cplusplus extern "C" { #endif @@ -29,3 +30,4 @@ disk_t *photorec_disk_selection_cli(const char *cmd_device, const list_disk_t *l #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/pdiskseln.h b/src/pdiskseln.h index 2fb122c6..e4cf41af 100644 --- a/src/pdiskseln.h +++ b/src/pdiskseln.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PDISKSELN_H +#define _PDISKSELN_H #ifdef __cplusplus extern "C" { #endif @@ -36,3 +38,4 @@ int do_curses_photorec(struct ph_param *params, struct ph_options *options, cons #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/pfree_whole.h b/src/pfree_whole.h index 2422b9d3..727eecf0 100644 --- a/src/pfree_whole.h +++ b/src/pfree_whole.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PFREE_WHOLE_H +#define _PFREE_WHOLE_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int ask_mode_ext2(const disk_t *disk_car, const partition_t *partition, unsigned #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/phbf.h b/src/phbf.h index ee3f8661..765d07ee 100644 --- a/src/phbf.h +++ b/src/phbf.h @@ -19,11 +19,15 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PHBF_H +#define _PHBF_H #ifdef __cplusplus extern "C" { #endif + pstatus_t photorec_bf(struct ph_param *params, const struct ph_options *options, alloc_data_t *list_search_space); + #ifdef __cplusplus } /* closing brace for extern "C" */ #endif - +#endif diff --git a/src/phbs.h b/src/phbs.h index 70c08051..031992f9 100644 --- a/src/phbs.h +++ b/src/phbs.h @@ -19,11 +19,15 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PHBS_H +#define _PHBS_H #ifdef __cplusplus extern "C" { #endif + pstatus_t photorec_find_blocksize(struct ph_param *params, const struct ph_options *options, alloc_data_t *list_search_space); + #ifdef __cplusplus } /* closing brace for extern "C" */ #endif - +#endif diff --git a/src/phcfg.h b/src/phcfg.h index 9b0418e5..66a382d6 100644 --- a/src/phcfg.h +++ b/src/phcfg.h @@ -1,3 +1,26 @@ +/* + + File: phcfg.h + + Copyright (C) 2020 Christophe GRENIER + + This software is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write the Free Software Foundation, Inc., 51 + Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + */ +#ifndef _PHCFG_H +#define _PHCFG_H #ifdef __cplusplus extern "C" { #endif @@ -9,3 +32,4 @@ int file_options_load(file_enable_t *files_enable); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/phcli.h b/src/phcli.h index 78e1b521..45dc5b07 100644 --- a/src/phcli.h +++ b/src/phcli.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PHCLI_H +#define _PHCLI_H #ifdef __cplusplus extern "C" { #endif @@ -34,3 +36,4 @@ int menu_photorec_cli(list_part_t *list_part, struct ph_param *params, struct ph #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/phnc.h b/src/phnc.h index 3a1bf20e..94a7d985 100644 --- a/src/phnc.h +++ b/src/phnc.h @@ -19,6 +19,9 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifndef _PHNC_H +#define _PHNC_H #ifdef __cplusplus extern "C" { #endif @@ -35,4 +38,4 @@ pstatus_t photorec_progressbar(WINDOW *window, const unsigned int pass, const st #ifdef __cplusplus } /* closing brace for extern "C" */ #endif - +#endif diff --git a/src/photorec_check_header.h b/src/photorec_check_header.h index a6797ce2..1aecd86f 100644 --- a/src/photorec_check_header.h +++ b/src/photorec_check_header.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PHOTOREC_CHECK_HEADER_H +#define _PHOTOREC_CHECK_HEADER_H #ifdef __cplusplus extern "C" { #endif @@ -175,3 +177,4 @@ inline static pstatus_t photorec_check_header(file_recovery_t *file_recovery, st #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/phrecn.h b/src/phrecn.h index 0a2ecbdd..598fa1b4 100644 --- a/src/phrecn.h +++ b/src/phrecn.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PHRECN_H +#define _PHRECN_H #ifdef __cplusplus extern "C" { #endif @@ -32,3 +34,4 @@ void interface_options_photorec_ncurses(struct ph_options *options); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/pnext.h b/src/pnext.h index 856ed9f4..b2196211 100644 --- a/src/pnext.h +++ b/src/pnext.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PNEXT_H +#define _PNEXT_H /* #define DEBUG_GET_NEXT_SECTOR */ static @@ -90,3 +92,4 @@ static inline void get_prev_sector(const alloc_data_t *list_search_space, alloc_ else get_prev_header(list_search_space, current_search_space, offset, blocksize); } +#endif diff --git a/src/poptions.h b/src/poptions.h index 9ad12766..391a9e08 100644 --- a/src/poptions.h +++ b/src/poptions.h @@ -19,6 +19,9 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifndef _POPTIONS_H +#define _POPTIONS_H #ifdef __cplusplus extern "C" { #endif @@ -39,3 +42,4 @@ void interface_options_photorec_log(const struct ph_options *options); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/ppartseln.h b/src/ppartseln.h index ee9a2013..85869196 100644 --- a/src/ppartseln.h +++ b/src/ppartseln.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PPARTSELN_H +#define _PPARTSELN_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ void menu_photorec(struct ph_param *params, struct ph_options *options, alloc_da #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/psearch.h b/src/psearch.h index fb4bf92d..fb4c7f39 100644 --- a/src/psearch.h +++ b/src/psearch.h @@ -1,3 +1,27 @@ +/* + + File: psearch.h + + Copyright (C) 2020 Christophe GRENIER + + This software is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write the Free Software Foundation, Inc., 51 + Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + */ +#ifndef _PSEARCH_H +#define _PSEARCH_H + static inline alloc_data_t *file_add_data(alloc_data_t *data, const uint64_t offset, const unsigned int content) { if(!(data->start <= offset && offset <= data->end)) @@ -57,4 +81,4 @@ static inline int ind_block(const unsigned char *buffer, const unsigned int bloc return 1; /* Ok: ind_block points to non-fragmented block */ } - +#endif diff --git a/src/psearchn.h b/src/psearchn.h index 481ec00c..0a214004 100644 --- a/src/psearchn.h +++ b/src/psearchn.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _PSEARCHN_H +#define _PSEARCHN_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ pstatus_t photorec_aux(struct ph_param *params, const struct ph_options *options #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/refs.h b/src/refs.h index b7cabef8..8a7f6ec5 100644 --- a/src/refs.h +++ b/src/refs.h @@ -22,6 +22,12 @@ * */ +#ifndef _REFS_H +#define _REFS_H +#ifdef __cplusplus +extern "C" { +#endif + #define ReFS_BS_SIZE 0x200 struct ReFS_boot_sector { uint8_t ignored[3]; @@ -35,4 +41,7 @@ struct ReFS_boot_sector { int check_ReFS(disk_t *disk, partition_t *partition); int recover_ReFS(const disk_t *disk, const struct ReFS_boot_sector *refs_header, partition_t *partition); - +#ifdef __cplusplus +} /* closing brace for extern "C" */ +#endif +#endif diff --git a/src/rfs.h b/src/rfs.h index 06427065..6d47dfdb 100644 --- a/src/rfs.h +++ b/src/rfs.h @@ -20,6 +20,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _RFS_H +#define _RFS_H #ifdef __cplusplus extern "C" { #endif @@ -123,3 +125,4 @@ int recover_rfs(const disk_t *disk_car, const struct reiserfs_super_block *sb, p #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/rfs_dir.h b/src/rfs_dir.h index 0df0bcd0..c9cbe270 100644 --- a/src/rfs_dir.h +++ b/src/rfs_dir.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _RFS_DIR_H +#define _RFS_DIR_H #ifdef __cplusplus extern "C" { #endif @@ -29,3 +31,4 @@ const char*td_reiserfs_version(void); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/savehdr.h b/src/savehdr.h index 75f75afb..93c0fc3c 100644 --- a/src/savehdr.h +++ b/src/savehdr.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _SAVEHDR_H +#define _SAVEHDR_H #ifdef __cplusplus extern "C" { #endif @@ -39,3 +41,4 @@ backup_disk_t *partition_load(const disk_t *disk_car, const int verbose); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/sessionp.h b/src/sessionp.h index 6dbad8fb..18ab7324 100644 --- a/src/sessionp.h +++ b/src/sessionp.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _SESSIONP_H +#define _SESSIONP_H #ifdef __cplusplus extern "C" { #endif @@ -30,3 +32,4 @@ time_t regular_session_save(alloc_data_t *list_free_space, struct ph_param *para #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/sun.h b/src/sun.h index a59d9c45..41784373 100644 --- a/src/sun.h +++ b/src/sun.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _SUN_H +#define _SUN_H #ifdef __cplusplus extern "C" { #endif @@ -95,3 +97,4 @@ int check_sun_i386(disk_t *disk_car, partition_t *partition, const int verbose); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/suspend.h b/src/suspend.h index 7e6779be..e969d38a 100644 --- a/src/suspend.h +++ b/src/suspend.h @@ -1,2 +1,34 @@ +/* + + File: suspend.h + + Copyright (C) 2020 Christophe GRENIER + + This software is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write the Free Software Foundation, Inc., 51 + Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + */ +#ifndef _SUSPEND_H +#define _SUSPEND_H +#ifdef __cplusplus +extern "C" { +#endif + void suspend_memory(j_common_ptr cinfo); int resume_memory(j_common_ptr cinfo); + +#ifdef __cplusplus +} /* closing brace for extern "C" */ +#endif +#endif diff --git a/src/swap.h b/src/swap.h index cd1d1a0a..bf675666 100644 --- a/src/swap.h +++ b/src/swap.h @@ -19,6 +19,9 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifndef _SWAP_H +#define _SWAP_H #ifdef __cplusplus extern "C" { #endif @@ -66,3 +69,4 @@ int recover_Linux_SWAP(const union swap_header *swap_header, partition_t *partit #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/sysv.h b/src/sysv.h index 72722510..7a2f175e 100644 --- a/src/sysv.h +++ b/src/sysv.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _SYSV_H +#define _SYSV_H #ifdef __cplusplus extern "C" { #endif @@ -206,3 +208,4 @@ int recover_sysv(const disk_t *disk_car, const struct sysv4_super_block *sbd, pa #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/tanalyse.h b/src/tanalyse.h index 583376ce..cef8b9eb 100644 --- a/src/tanalyse.h +++ b/src/tanalyse.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _TANALYSE_H +#define _TANALYSE_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ list_part_t *interface_analyse(disk_t *disk_car, const int verbose, const int sa #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/tdelete.h b/src/tdelete.h index 2c6f3efd..db3c0f7b 100644 --- a/src/tdelete.h +++ b/src/tdelete.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _TDELETE_H +#define _TDELETE_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int write_clean_table(disk_t *disk_car); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/tdiskop.h b/src/tdiskop.h index a6276901..8a1bf622 100644 --- a/src/tdiskop.h +++ b/src/tdiskop.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _TDISKOP_H +#define _TDISKOP_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int menu_disk(disk_t *disk_car, const int verbose,int dump_ind, const int savehe #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/tdisksel.h b/src/tdisksel.h index 15205ad0..55c488fe 100644 --- a/src/tdisksel.h +++ b/src/tdisksel.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _TDISKSEL_H +#define _TDISKSEL_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int do_curses_testdisk(int verbose, int dump_ind, const list_disk_t *list_disk, #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/texfat.h b/src/texfat.h index a2175f28..2a49daa1 100644 --- a/src/texfat.h +++ b/src/texfat.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _TEXFAT_H +#define _TEXFAT_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int exFAT_boot_sector(disk_t *disk, partition_t *partition, char **current_cmd); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/thfs.h b/src/thfs.h index a62e675b..8b0fc476 100644 --- a/src/thfs.h +++ b/src/thfs.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _THFS_H +#define _THFS_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int HFS_HFSP_boot_sector(disk_t *disk_car, partition_t *partition, const int ver #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/tload.h b/src/tload.h index e6a87578..f098fa03 100644 --- a/src/tload.h +++ b/src/tload.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _TLOAD_H +#define _TLOAD_H #ifdef HAVE_NCURSES #ifdef __cplusplus extern "C" { @@ -30,3 +32,4 @@ list_part_t *interface_load(disk_t *disk_car,list_part_t *list_part, const int v } /* closing brace for extern "C" */ #endif #endif +#endif diff --git a/src/tlog.h b/src/tlog.h index 6a6849b8..31d95fd7 100644 --- a/src/tlog.h +++ b/src/tlog.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _TLOG_H +#define _TLOG_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int ask_testdisk_log_creation(void); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/tmbrcode.h b/src/tmbrcode.h index bed35ae7..9c56378c 100644 --- a/src/tmbrcode.h +++ b/src/tmbrcode.h @@ -1,3 +1,26 @@ +/* + + File: tmbrcode.h + + Copyright (C) 2020 Christophe GRENIER + + This software is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write the Free Software Foundation, Inc., 51 + Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + */ +#ifndef _TMBRCODE_H +#define _TMBRCODE_H #ifdef __cplusplus extern "C" { #endif @@ -7,3 +30,4 @@ int write_MBR_code(disk_t *disk_car); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/tntfs.h b/src/tntfs.h index aef113d7..2011ab94 100644 --- a/src/tntfs.h +++ b/src/tntfs.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _TNTFS_H +#define _TNTFS_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int ntfs_boot_sector(disk_t *disk_car, partition_t *partition, const int verbose #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/toptions.h b/src/toptions.h index 6c874923..938c6943 100644 --- a/src/toptions.h +++ b/src/toptions.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _TOPTIONS_H +#define _TOPTIONS_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ void interface_options(int *dump_ind, int *align, unsigned int *expert, char**cu #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/tpartwr.h b/src/tpartwr.h index 4d92d126..b12187fc 100644 --- a/src/tpartwr.h +++ b/src/tpartwr.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _TPARTWR_H +#define _TPARTWR_H #ifdef __cplusplus extern "C" { #endif @@ -28,3 +30,4 @@ int interface_write(disk_t *disk_car,list_part_t *list_part,const int can_search #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/ufs.h b/src/ufs.h index 88229e45..5ddfb755 100644 --- a/src/ufs.h +++ b/src/ufs.h @@ -21,6 +21,8 @@ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ +#ifndef _UFS_H +#define _UFS_H #ifdef __cplusplus extern "C" { #endif @@ -487,3 +489,4 @@ int recover_ufs(const disk_t *disk_car, const struct ufs_super_block *sb, partit #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/unicode.h b/src/unicode.h index 863f8d1e..60fecca0 100644 --- a/src/unicode.h +++ b/src/unicode.h @@ -19,6 +19,8 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef _UNICODE_H +#define _UNICODE_H #ifdef __cplusplus extern "C" { #endif @@ -29,3 +31,4 @@ int str2UCSle(uint16_t *to, const char *from, const unsigned int len); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif diff --git a/src/xfs.h b/src/xfs.h index 935da1c3..dbd654be 100644 --- a/src/xfs.h +++ b/src/xfs.h @@ -27,6 +27,8 @@ * Fits into a sector-sized buffer at address 0 of each allocation group. * Only the first of these is ever updated except during growfs. */ +#ifndef _XFS_H +#define _XFS_H #ifdef __cplusplus extern "C" { #endif @@ -126,3 +128,4 @@ int recover_xfs(const disk_t *disk_car, const struct xfs_sb *sb, partition_t *pa #ifdef __cplusplus } /* closing brace for extern "C" */ #endif +#endif