[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / utils / hp2ps / Error.c
1 #include <stdio.h>
2 #include "Main.h"
3 #include "Defines.h"
4
5 /* own stuff */
6 #include "Error.h"
7
8 extern void exit PROTO((int));
9
10 /*VARARGS0*/
11 void
12 Error(a1,a2,a3,a4)
13   char* a1; char* a2; char* a3; char* a4;
14 {
15     fflush(stdout);
16     fprintf(stderr, "%s: ", programname);
17     fprintf(stderr, a1, a2, a3, a4);
18     fprintf(stderr, "\n");
19     exit(1);
20 }
21
22 /*VARARGS0*/
23 void
24 Disaster(a1,a2,a3,a4)
25   char* a1; char* a2; char* a3; char* a4;
26 {
27     fflush(stdout);
28     fprintf(stderr, "%s: ", programname);
29     fprintf(stderr, " Disaster! ("); 
30     fprintf(stderr, a1, a2, a3, a4);
31     fprintf(stderr, ")\n");
32     exit(1);
33 }
34
35 void
36 Usage(str)
37   char *str;
38 {
39    if (str) printf("error: %s\n", str);
40    printf("usage: %s -b -d -ef -g -i -p -mn -p -s -tf -y [file[.hp]]\n", programname);
41    printf("where -b  use large title box\n");
42    printf("      -d  sort by standard deviation\n"); 
43    printf("      -ef[in|mm|pt] produce Encapsulated PostScript f units wide\n");
44    printf("      -g  produce output suitable for GHOSTSCRIPT previever\n");
45    printf("      -i[+|-] sort by identifier string (-i+ gives greatest on top) \n"); 
46    printf("      -mn print maximum of n bands (default & max 20)\n");
47    printf("          -m0 removes the band limit altogether\n");
48    printf("      -p  use previous scaling, shading and ordering\n");
49    printf("      -s  use small title box\n");
50    printf("      -tf ignore trace bands which sum below f%% (default 1%%, max 5%%)\n");
51    printf("      -y  traditional\n");
52    exit(0);
53 }
54