summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/gdb/mswin/ginfodoc.h
blob: 75201c667ed602600a26b54d0eb901a497155bc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111

class CGnuInfoNode
{

 public:
  CString name;			/* name of node */
  CGnuInfoNode *prev;
  CGnuInfoNode *next;
  CGnuInfoNode *up;
  class CGnuInfoFile *file;	/* Which file is the node in */
  int offset;
  int pagenumber;
  void init (CGnuInfoNode *up, CGnuInfoNode *prev, CGnuInfoNode *next,
	     class  CGnuInfoFile *file, int off, int pagenumber);

  CGnuInfoNode(const char *n);
  int GetPageDepth();

};

#define BSIZE 512

class CGnuInfoFile
{

public:
CGnuInfoFile();
  CGnuInfoFile *next;
  CFile file;			
  char buf[BSIZE];
  int gc();
  long where();
  void set(long x);

  int off;
  int idx;
  int len;

};



class CGnuInfoDoc : public CDocument
{


 protected:			// create from serialization only
  CGnuInfoDoc();
  DECLARE_DYNCREATE(CGnuInfoDoc)
    CGnuInfoNode *LookupNode(const char *name);
  // Attributes
public:
  CGnuInfoFile *head;  
  // Operations
public:
  int npages;
  void Next();
  void Prev();
  void info(char *);
  void Up();
  CGnuInfoNode *nodes;
  void look(char *what, int *ptr);
  void GetPage(class CGnuInfoNode *want, CStringArray &p);
  CString GetPageName(int n);
  
  CGnuInfoNode *GetNode (int i);  
  int scanfile (CGnuInfoFile *, const char *, const char *);
  CMapStringToPtr map;
  CPtrArray vector;
  // Overrides
  // ClassWizard generated virtual function overrides
  //{{AFX_VIRTUAL(CGnuInfoDoc)
public:
  virtual BOOL OnNewDocument();
  virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
  virtual void OnCloseDocument();
  //}}AFX_VIRTUAL
  
  // Implementation
public:
  /* pointer to last place history read from, or hindex if not */
  
  virtual ~CGnuInfoDoc();
  virtual void Serialize(CArchive& ar);	// overridden for document i/o
  
  
protected:
  void GotoPage(int n);
  void RememberPage(int n);
#define HISTORY 20
  
  
  
  // transaction basis.
  int open;
  
  void InfoWorker (char *&dst, int val, char*name);  
  
  // Generated message map functions

protected:
  //{{AFX_MSG(CGnuInfoDoc)
  
  //}}AFX_MSG
  DECLARE_MESSAGE_MAP()



  };

/////////////////////////////////////////////////////////////////////////////