5 * Prints page headers. All functions are just front-ends to PS_startpage().
12 #include "trueprint.h"
13 #include "postscript.h"
17 static char *top_left_string
;
18 static char *top_centre_string
;
19 static char *top_right_string
;
20 static char *bottom_left_string
;
21 static char *bottom_centre_string
;
22 static char *bottom_right_string
;
23 static char *message_string
;
32 top_left_string
= NULL
;
33 string_option("X", "left-header", "%L", &top_left_string
, NULL
, NULL
,
35 "specify string for left side of header");
37 bottom_left_string
= NULL
;
38 string_option("x", "left-footer", "%L", &bottom_left_string
, NULL
, NULL
,
40 "specify string for left side of footer");
42 top_centre_string
= NULL
;
43 string_option("Y", "center-header", "%N", &top_centre_string
, NULL
, NULL
,
45 "specify string for center of header");
47 bottom_centre_string
= NULL
;
48 string_option("y", "center-footer", "%n %p", &bottom_centre_string
, NULL
, NULL
,
50 "specify string for center of footer");
52 top_right_string
= NULL
;
53 string_option("Z", "right-header", "Page %P of %F", &top_right_string
, NULL
, NULL
,
55 "specify string for right side of header");
57 bottom_right_string
= NULL
;
58 string_option("z", "right-footer", "Page %P of %F", &bottom_right_string
, NULL
, NULL
,
60 "specify string for right side of footer");
62 message_string
= NULL
;
63 string_option("m", "message", NULL
, &message_string
, NULL
, NULL
,
65 "message to be printed over page");
73 print_text_header(long page_number
, long total_pages
)
75 PS_startpage(top_left_string
, top_centre_string
, top_right_string
,
76 bottom_left_string
, bottom_centre_string
, bottom_right_string
,
77 message_string
, page_number
, total_pages
, FALSE
);
85 print_file_header(long page_no
)
87 char page_no_string
[10];
89 sprintf(page_no_string
, "Page %ld", page_no
);
91 PS_startpage("%L", "File Index", page_no_string
,
92 "%L", "File Index", page_no_string
,
93 message_string
, page_no
, 0, TRUE
);
101 print_index_header(long page_no
)
103 char page_no_string
[10];
105 sprintf(page_no_string
, "Page %ld", page_no
);
107 PS_startpage("%L", "Function Index", page_no_string
,
108 "%L", "Function Index", page_no_string
,
109 message_string
, page_no
, 0, TRUE
);