#ifndef _DATASTRUCT_H_8500a0c2_ #define _DATASTRUCT_H_8500a0c2_ #include "memstream.h" typedef enum { HLT_COMMON = 1, HLT_FROM, HLT_TO, } HLT; typedef struct fil FIL; /* stdio has FILE sewed up */ typedef struct hunk HUNK; typedef struct hunkline HUNKLINE; struct fil { FIL *link; char *name; char *escname; HUNK *diffs; unsigned int flags; #define FF_ALLAPPLIED 0x00000001 unsigned char *contents; int contents_len; } ; struct hunkline { HUNKLINE *link; HUNK *h; int l; HLT type; char *text; } ; struct hunk { HUNK *alink; HUNK *flink; FIL *f; unsigned int flags; #define HF_APPLIED 0x00000001 #define HF_SELECTED 0x00000002 char *hdrline; int fl; int fn; int tl; int tn; HUNKLINE *lines; } ; extern char *workdir; extern FIL *files; extern HUNK *hunks; #endif