[BACK]Return to flist.h CVS log [TXT][DIR] Up to [Development] / xfs-cmds / xfsprogs / db

File: [Development] / xfs-cmds / xfsprogs / db / flist.h (download)

Revision 1.6, Fri Nov 11 14:27:22 2005 UTC (11 years, 11 months ago) by nathans.longdrop.melbourne.sgi.com
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +2 -29 lines

Update copyright/license notices to match SGI legal prefered boilerplate.
Merge of master-melb:xfs-cmds:24374a by kenmcd.

/*
 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
 * All Rights Reserved.
 */

struct field;

typedef struct flist {
	char			*name;
	const struct field	*fld;
	struct flist		*child;
	struct flist		*sibling;
	int			low;
	int			high;
	int			flags;
	int			offset;
} flist_t;

/*
 * Flags for flist
 */
#define	FL_OKLOW	1
#define	FL_OKHIGH	2

typedef enum tokty {
	TT_NAME, TT_NUM, TT_STRING, TT_LB, TT_RB, TT_DASH, TT_DOT, TT_END
} tokty_t;

typedef struct ftok {
	char	*tok;
	tokty_t	tokty;
} ftok_t;

extern void	flist_free(flist_t *fl);
extern flist_t	*flist_make(char *name);
extern int	flist_parse(const struct field *fields, flist_t *fl, void *obj,
			    int startoff);
extern void	flist_print(flist_t *fl);
extern flist_t	*flist_scan(char *name);