Jspice3
hlpdefs.h
Go to the documentation of this file.
1 /***************************************************************************
2 JSPICE3 adaptation of Spice3e2 - Copyright (c) Stephen R. Whiteley 1992
3 Copyright 1990 Regents of the University of California. All rights reserved.
4 Authors: 1986 Wayne A. Christopher
5  1994 Stephen R. Whiteley
6 ****************************************************************************/
7 
8 /*
9  * Definitions for the help system.
10  */
11 
12 #include "cpstd.h"
13 
14 #ifdef HAVE_X11
15 #include <X11/Intrinsic.h>
16 #include "x11util.h"
17 #endif
18 
19 /* name of help database file */
20 #define DBFILE "spicehlp.txt"
21 
22 /* keywords used in the database file */
23 #define HLP_KEYWORD "!!KEYWORD"
24 #define HLP_TITLE "!!TITLE"
25 #define HLP_TEXT "!!TEXT"
26 #define HLP_SEEALSO "!!SEEALSO"
27 #define HLP_SUBTOPICS "!!SUBTOPICS"
28 
29 struct sHlpEnt {
30  long offset;
31  char *keyword;
32  char *title;
33  struct sHlpEnt *next;
34 };
35 
36 typedef struct toplink {
37  char *description; /* really the subject */
38  char *buttontext;
39  char *keyword;
40  struct toplink *next;
41  struct topic *top;
42 #ifdef HAVE_X11
43  Widget button;
44  struct topic *newtop;
45 #endif
46 } toplink;
47 
48 typedef struct topic {
49  char *title;
50  char *keyword;
52  char *chartext;
55  int xposition;
56  int yposition;
57  struct topic *parent;
58  struct topic *lastborn;
59  struct topic *sibling;
60  int numlines;
61  int maxcols;
63 #ifdef HAVE_X11
64  widget_bag widgets;
65 #endif
66 } topic;
67 
68 #define X_INCR 20
69 #define Y_INCR 20
70 #define START_XPOS 100
71 #define START_YPOS 100
72 
73 
74 /* External symbols. */
75 
76 /* provide.c */
77 extern bool hlp_usex;
78 #ifdef __STDC__
79 extern void hlp_provide(topic*);
80 extern void hlp_fixchildren(topic*);
81 extern void hlp_killfamily(topic*);
82 #else
83 extern void hlp_provide();
84 extern void hlp_fixchildren();
85 extern void hlp_killfamily();
86 #endif
87 
88 /* readhelp.c */
89 extern char *hlp_directory;
90 extern int hlp_initxpos;
91 extern int hlp_initypos;
92 #ifdef __STDC__
93 extern void hlp_main(char*,wordlist*);
94 extern topic *hlp_read(char*);
95 extern void hlp_free(topic*);
96 #else
97 extern void hlp_main();
98 extern topic *hlp_read();
99 extern void hlp_free();
100 #endif
101 
102 /* textdisplay.c */
103 extern int hlp_width;
104 #ifdef __STDC__
105 extern bool hlp_tdisplay(topic*);
106 extern toplink *hlp_thandle(topic**);
107 extern void hlp_tkillwin(topic*);
108 #else
109 extern bool hlp_tdisplay();
110 extern toplink *hlp_thandle();
111 extern void hlp_tkillwin();
112 #endif
113 
114 /* X11disp.c */
115 extern bool hlp_killx;
116 #ifdef __STDC__
117 extern bool hlp_xdisplay(topic*);
118 extern void hlp_xclosedisplay(void);
119 extern toplink *hlp_xhandle(topic**);
120 extern void hlp_xkillwin(topic*);
121 extern void hlp_xwait(topic*,bool);
122 #else
123 extern bool hlp_xdisplay();
124 extern void hlp_xclosedisplay();
125 extern toplink *hlp_xhandle();
126 extern void hlp_xkillwin();
127 extern void hlp_xwait();
128 #endif
int hlp_width
struct toplink toplink
int curtopline
Definition: hlpdefs.h:62
void hlp_xkillwin()
int maxcols
Definition: hlpdefs.h:61
bool hlp_tdisplay()
bool hlp_xdisplay()
int xposition
Definition: hlpdefs.h:55
struct topic * parent
Definition: hlpdefs.h:57
struct topic topic
void hlp_tkillwin()
toplink * seealso
Definition: hlpdefs.h:54
toplink * hlp_thandle()
wordlist * text
Definition: hlpdefs.h:51
topic * hlp_read()
toplink * subtopics
Definition: hlpdefs.h:53
char * chartext
Definition: hlpdefs.h:52
int numlines
Definition: hlpdefs.h:60
void hlp_provide()
struct topic * lastborn
Definition: hlpdefs.h:58
bool hlp_killx
void hlp_main()
void hlp_xclosedisplay()
void hlp_killfamily()
bool hlp_usex
Definition: provide.c:15
Definition: hlpdefs.h:48
void hlp_free()
toplink * hlp_xhandle()
struct topic * sibling
Definition: hlpdefs.h:59
char * keyword
Definition: hlpdefs.h:31
int hlp_initxpos
Definition: readhelp.c:16
Definition: cpstd.h:21
char * title
Definition: hlpdefs.h:49
char * title
Definition: hlpdefs.h:32
long offset
Definition: hlpdefs.h:30
int hlp_initypos
Definition: readhelp.c:17
struct sHlpEnt * next
Definition: hlpdefs.h:33
char * hlp_directory
Definition: readhelp.c:15
void hlp_xwait()
char * keyword
Definition: hlpdefs.h:50
void hlp_fixchildren()
int yposition
Definition: hlpdefs.h:56