#ifndef _DATASTRUCT_H_5ebc0f27_ #define _DATASTRUCT_H_5ebc0f27_ #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 *flink; FIL *blink; char *name; char *escname; HUNK *diff_h; HUNK *diff_t; 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 *aflink; HUNK *ablink; HUNK *fflink; HUNK *fblink; 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 *file_h; extern FIL *file_t; extern HUNK *hunk_h; extern HUNK *hunk_t; #endif