7 * Options from the command line, to pass to each function that need some
20 * Line coming from stdin, wrapped in a header.
23 char *content
; /* sent as output and matched by input */
24 char *comment
; /* displayed at the right of the content */
26 int number
; /* set here as order will not change */
27 int matches
; /* whether it matches buffer's input */
28 int header
; /* whether the line is a header */
30 struct Line
*prev
; /* doubly linked list structure */
35 * Group of lines from stdin delimited by a header line.
37 * The header lines are identified by a leading 'HEADER' character,
38 * specified on command line. Each header contains a doubly linked list of
43 * Buffer containing a doubly linked list of headers
45 typedef struct Buffer
{
46 int total
; /* total number of line in buffer */
47 int matching
; /* number lines matching the input */
49 char input
[LINE_SIZE
]; /* string from user's keyboard */
50 char *prompt
; /* specified from the command line */
52 Line
*empty
; /* empty line, for when needed */
53 Line
*current
; /* selected line, highlighted */
54 Line
*first
; /* boundaries of the linked list */