consolidate btree block handling for xfs_db
PATCH 1/1 consolidate btree block handling for xfs_db
Currently xfs_db has five different implementations for poking at btree blocks, even duplicating code for btree blocks with entirely identical layout (bmapbta vs bmapbtd and bno vs cnt). Merge all these into a single implementation that uses a table of btree characteristics keyed of their magic number.
There's probably a way to further consolidate the magic arrays for the different types, but I don't quite understand xfs_db's table driven command parser for that.
Signed-off-by Christoph Hellwig <[email protected]>
xfsprogs/db/bmapbt.c deleted +0 -329
@@ -1,329 +0,0 @@ -/* -* Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. -* All Rights Reserved. -* -* This program 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. -* -* This program is distributed in the hope that it would 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 St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#include <xfs/libxfs.h> -#include "type.h" -#include "faddr.h" -#include "fprint.h" -#include "field.h" -#include "bmapbt.h" -#include "print.h" -#include "bit.h" -#include "init.h" - -static int bmapbta_key_count (void *obj,int startoff); -static int bmapbta_key_offset (void *obj,int startoff,int idx); -static int bmapbta_ptr_count (void *obj,int startoff); -static int bmapbta_ptr_offset (void *obj,int startoff,int idx); -static int bmapbta_rec_count (void *obj,int startoff); -static int bmapbta_rec_offset (void *obj,int startoff,int idx); -static int bmapbtd_key_count (void *obj,int startoff); -static int bmapbtd_key_offset (void *obj,int startoff,int idx); -static int bmapbtd_ptr_count (void *obj,int startoff); -static int bmapbtd_ptr_offset (void *obj,int startoff,int idx); -static int bmapbtd_rec_count (void *obj,int startoff); -static int bmapbtd_rec_offset (void *obj,int startoff,int idx); - -const field_t bmapbta_hfld[] = { - {"" ,FLDT_BMAPBTA ,OI (0 ),C1 ,0 ,TYP_NONE }, - {NULL } -}; -const field_t bmapbtd_hfld[] = { - {"" ,FLDT_BMAPBTD ,OI (0 ),C1 ,0 ,TYP_NONE }, - {NULL } -}; - -#define OFF (f) bitize(offsetof(xfs_bmbt_block_t, bb_ ## f)) -const field_t bmapbta_flds[] = { - {"magic" ,FLDT_UINT32X ,OI (OFF (magic)),C1 ,0 ,TYP_NONE }, - {"level" ,FLDT_UINT16D ,OI (OFF (level)),C1 ,0 ,TYP_NONE }, - {"numrecs" ,FLDT_UINT16D ,OI (OFF (numrecs)),C1 ,0 ,TYP_NONE }, - {"leftsib" ,FLDT_DFSBNO ,OI (OFF (leftsib)),C1 ,0 ,TYP_BMAPBTA }, - {"rightsib" ,FLDT_DFSBNO ,OI (OFF (rightsib)),C1 ,0 ,TYP_BMAPBTA }, - {"recs" ,FLDT_BMAPBTAREC , bmapbta_rec_offset, bmapbta_rec_count, -FLD_ARRAY |FLD_ABASE1 |FLD_COUNT |FLD_OFFSET ,TYP_NONE }, - {"keys" ,FLDT_BMAPBTAKEY , bmapbta_key_offset, bmapbta_key_count, -FLD_ARRAY |FLD_ABASE1 |FLD_COUNT |FLD_OFFSET ,TYP_NONE }, - {"ptrs" ,FLDT_BMAPBTAPTR , bmapbta_ptr_offset, bmapbta_ptr_count, -FLD_ARRAY |FLD_ABASE1 |FLD_COUNT |FLD_OFFSET ,TYP_BMAPBTA }, - {NULL } -}; -const field_t bmapbtd_flds[] = { - {"magic" ,FLDT_UINT32X ,OI (OFF (magic)),C1 ,0 ,TYP_NONE }, - {"level" ,FLDT_UINT16D ,OI (OFF (level)),C1 ,0 ,TYP_NONE }, - {"numrecs" ,FLDT_UINT16D ,OI (OFF (numrecs)),C1 ,0 ,TYP_NONE }, - {"leftsib" ,FLDT_DFSBNO ,OI (OFF (leftsib)),C1 ,0 ,TYP_BMAPBTD }, - {"rightsib" ,FLDT_DFSBNO ,OI (OFF (rightsib)),C1 ,0 ,TYP_BMAPBTD }, - {"recs" ,FLDT_BMAPBTDREC , bmapbtd_rec_offset, bmapbtd_rec_count, -FLD_ARRAY |FLD_ABASE1 |FLD_COUNT |FLD_OFFSET ,TYP_NONE }, - {"keys" ,FLDT_BMAPBTDKEY , bmapbtd_key_offset, bmapbtd_key_count, -FLD_ARRAY |FLD_ABASE1 |FLD_COUNT |FLD_OFFSET ,TYP_NONE }, - {"ptrs" ,FLDT_BMAPBTDPTR , bmapbtd_ptr_offset, bmapbtd_ptr_count, -FLD_ARRAY |FLD_ABASE1 |FLD_COUNT |FLD_OFFSET ,TYP_BMAPBTD }, - {NULL } -}; - -#define KOFF (f) bitize(offsetof(xfs_bmbt_key_t, br_ ## f)) -const field_t bmapbta_key_flds[] = { - {"startoff" ,FLDT_DFILOFFA ,OI (KOFF (startoff)),C1 ,0 ,TYP_ATTR }, - {NULL } -}; -const field_t bmapbtd_key_flds[] = { - {"startoff" ,FLDT_DFILOFFD ,OI (KOFF (startoff)),C1 ,0 ,TYP_INODATA }, - {NULL } -}; - -#ifndef XFS_NATIVE_HOST - -#define BMBT_EXNTFLAG_BITOFF 0 -#define BMBT_STARTOFF_BITOFF (BMBT_EXNTFLAG_BITOFF + BMBT_EXNTFLAG_BITLEN) -#define BMBT_STARTBLOCK_BITOFF (BMBT_STARTOFF_BITOFF + BMBT_STARTOFF_BITLEN) -#define BMBT_BLOCKCOUNT_BITOFF \ - (BMBT_STARTBLOCK_BITOFF + BMBT_STARTBLOCK_BITLEN) - -#else - -#define BMBT_EXNTFLAG_BITOFF 63 -#define BMBT_STARTOFF_BITOFF (BMBT_EXNTFLAG_BITOFF - BMBT_STARTOFF_BITLEN) -#define BMBT_STARTBLOCK_BITOFF 85/* 128 - 43 (other 9 is in first word) */ -#define BMBT_BLOCKCOUNT_BITOFF 64/* Start of second 64 bit container */ - -#endif /* XFS_NATIVE_HOST */ - -const field_t bmapbta_rec_flds[] = { - {"startoff" ,FLDT_CFILEOFFA ,OI (BMBT_STARTOFF_BITOFF ),C1 ,0 , -TYP_ATTR }, - {"startblock" ,FLDT_CFSBLOCK ,OI (BMBT_STARTBLOCK_BITOFF ),C1 ,0 , -TYP_ATTR }, - {"blockcount" ,FLDT_CEXTLEN ,OI (BMBT_BLOCKCOUNT_BITOFF ),C1 ,0 , -TYP_NONE }, - {"extentflag" ,FLDT_CEXTFLG ,OI (BMBT_EXNTFLAG_BITOFF ),C1 ,0 , -TYP_NONE }, - {NULL } -}; -const field_t bmapbtd_rec_flds[] = { - {"startoff" ,FLDT_CFILEOFFD ,OI (BMBT_STARTOFF_BITOFF ),C1 ,0 , -TYP_INODATA }, - {"startblock" ,FLDT_CFSBLOCK ,OI (BMBT_STARTBLOCK_BITOFF ),C1 ,0 , -TYP_INODATA }, - {"blockcount" ,FLDT_CEXTLEN ,OI (BMBT_BLOCKCOUNT_BITOFF ),C1 ,0 , -TYP_NONE }, - {"extentflag" ,FLDT_CEXTFLG ,OI (BMBT_EXNTFLAG_BITOFF ),C1 ,0 , -TYP_NONE }, - {NULL } -}; - -static int -bmapbta_key_count ( -void *obj, -int startoff) -{ -xfs_bmbt_block_t *block; - -ASSERT (startoff ==0 ); - block = obj; -if (be16_to_cpu (block->bb_level) ==0 ) -return 0 ; -return be16_to_cpu (block->bb_numrecs); -} - -static int -bmapbta_key_offset ( -void *obj, -int startoff, -int idx) -{ -xfs_bmbt_block_t *block; -xfs_bmbt_key_t *kp; - -ASSERT (startoff ==0 ); - block = obj; -ASSERT (be16_to_cpu (block->bb_level) >0 ); - kp =XFS_BTREE_KEY_ADDR (xfs_bmbt, block, idx); -return bitize ((int )((char *)kp - (char *)block)); -} - -static int -bmapbta_ptr_count ( -void *obj, -int startoff) -{ -xfs_bmbt_block_t *block; - -ASSERT (startoff ==0 ); - block = obj; -if (be16_to_cpu (block->bb_level) ==0 ) -return 0 ; -return be16_to_cpu (block->bb_numrecs); -} - -static int -bmapbta_ptr_offset ( -void *obj, -int startoff, -int idx) -{ -xfs_bmbt_block_t *block; -xfs_bmbt_ptr_t *pp; - -ASSERT (startoff ==0 ); - block = obj; -ASSERT (be16_to_cpu (block->bb_level) >0 ); - pp =XFS_BTREE_PTR_ADDR (xfs_bmbt, block, idx, -XFS_BTREE_BLOCK_MAXRECS (mp->m_sb.sb_blocksize, xfs_bmbt,0 )); -return bitize ((int )((char *)pp - (char *)block)); -} - -static int -bmapbta_rec_count ( -void *obj, -int startoff) -{ -xfs_bmbt_block_t *block; - -ASSERT (startoff ==0 ); - block = obj; -if (be16_to_cpu (block->bb_level) >0 ) -return 0 ; -return be16_to_cpu (block->bb_numrecs); -} - -static int -bmapbta_rec_offset ( -void *obj, -int startoff, -int idx) -{ -xfs_bmbt_block_t *block; -xfs_bmbt_rec_t *rp; - -ASSERT (startoff ==0 ); - block = obj; -ASSERT (be16_to_cpu (block->bb_level) ==0 ); - rp =XFS_BTREE_REC_ADDR (xfs_bmbt, block, idx); -return bitize ((int )((char *)rp - (char *)block)); -} - -int -bmapbta_size ( -void *obj, -int startoff, -int idx) -{ -return bitize (mp->m_sb.sb_blocksize); -} - -static int -bmapbtd_key_count ( -void *obj, -int startoff) -{ -xfs_bmbt_block_t *block; - -ASSERT (startoff ==0 ); - block = obj; -if (be16_to_cpu (block->bb_level) ==0 ) -return 0 ; -return be16_to_cpu (block->bb_numrecs); -} - -static int -bmapbtd_key_offset ( -void *obj, -int startoff, -int idx) -{ -xfs_bmbt_block_t *block; -xfs_bmbt_key_t *kp; - -ASSERT (startoff ==0 ); - block = obj; -ASSERT (be16_to_cpu (block->bb_level) >0 ); - kp =XFS_BTREE_KEY_ADDR (xfs_bmbt, block, idx); -return bitize ((int )((char *)kp - (char *)block)); -} - -static int -bmapbtd_ptr_count ( -void *obj, -int startoff) -{ -xfs_bmbt_block_t *block; - -ASSERT (startoff ==0 ); - block = obj; -if (be16_to_cpu (block->bb_level) ==0 ) -return 0 ; -return be16_to_cpu (block->bb_numrecs); -} - -static int -bmapbtd_ptr_offset ( -void *obj, -int startoff, -int idx) -{ -xfs_bmbt_block_t *block; -xfs_bmbt_ptr_t *pp; - -ASSERT (startoff ==0 ); - block = obj; -ASSERT (be16_to_cpu (block->bb_level) >0 ); - pp =XFS_BTREE_PTR_ADDR (xfs_bmbt, block, idx, -XFS_BTREE_BLOCK_MAXRECS (mp->m_sb.sb_blocksize, xfs_bmbt,0 )); -return bitize ((int )((char *)pp - (char *)block)); -} - -static int -bmapbtd_rec_count ( -void *obj, -int startoff) -{ -xfs_bmbt_block_t *block; - -ASSERT (startoff ==0 ); - block = obj; -if (be16_to_cpu (block->bb_level) >0 ) -return 0 ; -return be16_to_cpu (block->bb_numrecs); -} - -static int -bmapbtd_rec_offset ( -void *obj, -int startoff, -int idx) -{ -xfs_bmbt_block_t *block; -xfs_bmbt_rec_t *rp; - -ASSERT (startoff ==0 ); - block = obj; -ASSERT (be16_to_cpu (block->bb_level) ==0 ); - rp =XFS_BTREE_REC_ADDR (xfs_bmbt, block, idx); -return bitize ((int )((char *)rp - (char *)block)); -} - -int -bmapbtd_size ( -void *obj, -int startoff, -int idx) -{ -return bitize (mp->m_sb.sb_blocksize); -}
xfsprogs/db/bmapbt.h deleted +0 -29
@@ -1,29 +0,0 @@ -/* -* Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. -* All Rights Reserved. -* -* This program 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. -* -* This program is distributed in the hope that it would 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 St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -extern const struct field bmapbta_flds[]; -extern const struct field bmapbta_hfld[]; -extern const struct field bmapbta_key_flds[]; -extern const struct field bmapbta_rec_flds[]; -extern const struct field bmapbtd_flds[]; -extern const struct field bmapbtd_hfld[]; -extern const struct field bmapbtd_key_flds[]; -extern const struct field bmapbtd_rec_flds[]; - -extern int bmapbta_size (void *obj,int startoff,int idx); -extern int bmapbtd_size (void *obj,int startoff,int idx);
xfsprogs/db/field.c +6 -9
@@ -22,10 +22,7 @@#include "fprint.h" #include "field.h" #include "inode.h" -#include "bnobt.h" -#include "cntbt.h" -#include "inobt.h" -#include "bmapbt.h" +#include "btblock.h" #include "bmroot.h" #include "bit.h" #include "agf.h"
@@ -87,7 +84,7 @@ const ftattr_t ftattrtab[] = { fa_attrblock, NULL }, { FLDT_ATTRSHORT, "attrshort", NULL, (char *)attr_shortform_flds, attrshort_size, FTARG_SIZE, NULL, attr_shortform_flds }, - { FLDT_BMAPBTA, "bmapbta", NULL, (char *)bmapbta_flds, bmapbta_size, + { FLDT_BMAPBTA, "bmapbta", NULL, (char *)bmapbta_flds, btblock_size, FTARG_SIZE, NULL, bmapbta_flds }, { FLDT_BMAPBTAKEY, "bmapbtakey", fp_sarray, (char *)bmapbta_key_flds, SI(bitsz(xfs_bmbt_key_t)), 0, NULL, bmapbta_key_flds },
@@ -95,7 +92,7 @@ const ftattr_t ftattrtab[] = { SI(bitsz(xfs_bmbt_ptr_t)), 0, fa_dfsbno, NULL }, { FLDT_BMAPBTAREC, "bmapbtarec", fp_sarray, (char *)bmapbta_rec_flds, SI(bitsz(xfs_bmbt_rec_t)), 0, NULL, bmapbta_rec_flds }, - { FLDT_BMAPBTD, "bmapbtd", NULL, (char *)bmapbtd_flds, bmapbtd_size, + { FLDT_BMAPBTD, "bmapbtd", NULL, (char *)bmapbtd_flds, btblock_size, FTARG_SIZE, NULL, bmapbtd_flds }, { FLDT_BMAPBTDKEY, "bmapbtdkey", fp_sarray, (char *)bmapbtd_key_flds, SI(bitsz(xfs_bmbt_key_t)), 0, NULL, bmapbtd_key_flds },
@@ -115,7 +112,7 @@ const ftattr_t ftattrtab[] = { SI(bitsz(xfs_bmdr_key_t)), 0, NULL, bmrootd_key_flds }, { FLDT_BMROOTDPTR, "bmrootdptr", fp_num, "%llu", SI(bitsz(xfs_bmdr_ptr_t)), 0, fa_dfsbno, NULL }, - { FLDT_BNOBT, "bnobt", NULL, (char *)bnobt_flds, bnobt_size, FTARG_SIZE, + { FLDT_BNOBT, "bnobt", NULL, (char *)bnobt_flds, btblock_size, FTARG_SIZE, NULL, bnobt_flds }, { FLDT_BNOBTKEY, "bnobtkey", fp_sarray, (char *)bnobt_key_flds, SI(bitsz(xfs_alloc_key_t)), 0, NULL, bnobt_key_flds },
@@ -136,7 +133,7 @@ const ftattr_t ftattrtab[] = { {FLDT_CHARNS ,"charns" , fp_charns,NULL ,SI (bitsz (char)),0 ,NULL , NULL }, { FLDT_CHARS, "chars", fp_num, "%c", SI(bitsz(char)), 0, NULL, NULL }, - { FLDT_CNTBT, "cntbt", NULL, (char *)cntbt_flds, cntbt_size, FTARG_SIZE, + { FLDT_CNTBT, "cntbt", NULL, (char *)cntbt_flds, btblock_size, FTARG_SIZE, NULL, cntbt_flds }, { FLDT_CNTBTKEY, "cntbtkey", fp_sarray, (char *)cntbt_key_flds, SI(bitsz(xfs_alloc_key_t)), 0, NULL, cntbt_key_flds },
@@ -247,7 +244,7 @@ const ftattr_t ftattrtab[] = { FTARG_SIGNED, NULL, NULL }, { FLDT_INO, "ino", fp_num, "%llu", SI(bitsz(xfs_ino_t)), FTARG_DONULL, fa_ino, NULL }, - { FLDT_INOBT, "inobt", NULL, (char *)inobt_flds, inobt_size, + { FLDT_INOBT, "inobt", NULL, (char *)inobt_flds, btblock_size, FTARG_SIZE, NULL, inobt_flds }, { FLDT_INOBTKEY, "inobtkey", fp_sarray, (char *)inobt_key_flds, SI(bitsz(xfs_inobt_key_t)), 0, NULL, inobt_key_flds },
xfsprogs/db/Makefile +5 -6
@@ -8,12 +8,11 @@ include $(TOPDIR)/include/builddefs LTCOMMAND = xfs_db HFILES = addr.h agf.h agfl.h agi.h attr.h attrshort.h bit.h block.h bmap.h \ - bmapbt.h bmroot.h bnobt.h check.h cntbt.h command.h convert.h \ - dbread.h debug.h dir.h dir2.h dir2sf.h dirshort.h dquot.h echo.h \ - faddr.h field.h flist.h fprint.h frag.h freesp.h hash.h help.h \ - init.h inobt.h inode.h input.h io.h malloc.h metadump.h output.h \ - print.h quit.h sb.h sig.h strvec.h text.h type.h write.h \ - attrset.h + btblock.h bmroot.h check.h command.h convert.h dbread.h debug.h \ + dir.h dir2.h dir2sf.h dirshort.h dquot.h echo.h faddr.h field.h \ + flist.h fprint.h frag.h freesp.h hash.h help.h init.h inode.h input.h \ + io.h malloc.h metadump.h output.h print.h quit.h sb.h sig.h strvec.h \ + text.h type.h write.h attrset.h CFILES = $(HFILES:.h=.c) LSRCFILES = xfs_admin.sh xfs_check.sh xfs_ncheck.sh xfs_metadump.sh LLDLIBS = $(LIBXFS) $(LIBXLOG) $(LIBUUID) $(LIBRT) $(LIBPTHREAD)
xfsprogs/db/bnobt.c deleted +0 -170
170 lines not on this page · raw message
xfsprogs/db/bnobt.h deleted +0 -24
@@ -1,24 +0,0 @@ -/* -* Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. -* All Rights Reserved. -* -* This program 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. -* -* This program is distributed in the hope that it would 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 St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -extern const struct field bnobt_flds[]; -extern const struct field bnobt_hfld[]; -extern const struct field bnobt_key_flds[]; -extern const struct field bnobt_rec_flds[]; - -extern int bnobt_size (void *obj,int startoff,int idx);
xfsprogs/db/btblock.c new file +414 -0
414 lines not on this page · raw message
xfsprogs/db/btblock.h new file +44 -0
44 lines not on this page · raw message
xfsprogs/db/cntbt.c deleted +0 -176
176 lines not on this page · raw message
xfsprogs/db/cntbt.h deleted +0 -24
@@ -1,24 +0,0 @@ -/* -* Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. -* All Rights Reserved. -* -* This program 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. -* -* This program is distributed in the hope that it would 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 St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -extern const struct field cntbt_flds[]; -extern const struct field cntbt_hfld[]; -extern const struct field cntbt_key_flds[]; -extern const struct field cntbt_rec_flds[]; - -extern int cntbt_size (void *obj,int startoff,int idx);
xfsprogs/db/fprint.c +1 -1
@@ -24,7 +24,7 @@#include "fprint.h" #include "field.h" #include "inode.h" -#include "inobt.h" +#include "btblock.h" #include "bit.h" #include "print.h" #include "output.h"
xfsprogs/db/inobt.c deleted +0 -176
176 lines not on this page · raw message
xfsprogs/db/inobt.h deleted +0 -24
@@ -1,24 +0,0 @@ -/* -* Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. -* All Rights Reserved. -* -* This program 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. -* -* This program is distributed in the hope that it would 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 St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -extern const struct field inobt_flds[]; -extern const struct field inobt_hfld[]; -extern const struct field inobt_key_flds[]; -extern const struct field inobt_rec_flds[]; - -extern int inobt_size (void *obj,int startoff,int idx);
xfsprogs/db/type.c +1 -4
@@ -26,10 +26,7 @@#include "print.h" #include "sb.h" #include "inode.h" -#include "bnobt.h" -#include "cntbt.h" -#include "inobt.h" -#include "bmapbt.h" +#include "btblock.h" #include "bmroot.h" #include "agf.h" #include "agfl.h"