summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/man/lib/gripes.c
blob: 466f0bc409e9dab9deaeca340a082bff32f61b0f (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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
/*
 * gripes.c
 *
 * Copyright (c) 1990, 1991, John W. Eaton.
 *
 * You may distribute under the terms of the GNU General Public
 * License as specified in the file COPYING that comes with the man
 * distribution.
 *
 * John W. Eaton
 * jwe@che.utexas.edu
 * Department of Chemical Engineering
 * The University of Texas at Austin
 * Austin, Texas  78712
 */

#include <stdio.h>
#include "gripes.h"

#ifdef STDC_HEADERS
#include <stdlib.h>
#else
extern int fprintf ();
extern int fflush ();
extern int exit ();
#endif

extern char *prognam;

void
gripe_no_name (section)
     char *section;
{
  if (section)
    fprintf (stderr, "What manual page do you want from section %s?\n",
	     section);
  else
    fprintf (stderr, "What manual page do you want?\n");

  fflush (stderr);
}

void
gripe_reading_man_file (name)
     char *name;
{
  fprintf (stderr, "Read access denied for file %s\n", name);

  fflush (stderr);
}

void
gripe_converting_name (name, to_cat)
     char *name;
     int to_cat;
{
  if (to_cat)
    fprintf (stderr, "Error converting %s to cat name\n", name);
  else
    fprintf (stderr, "Error converting %s to man name\n", name);

  fflush (stderr);

  exit (1);
}

void
gripe_system_command (status)
     int status;
{
  fprintf (stderr, "Error executing formatting or display command.\n");
  fprintf (stderr, "system command exited with status %d\n", status);

  fflush (stderr);
}

void
gripe_not_found (name, section)
     char *name, *section;
{
  if (section)
    fprintf (stderr, "No entry for %s in section %s of the manual\n",
	     name, section);
  else
    fprintf (stderr, "No manual entry for %s\n", name);

  fflush (stderr);
}

void
gripe_incompatible (s)
     char *s;
{
  fprintf (stderr, "%s: incompatible options %s\n", prognam, s);

  fflush (stderr);

  exit (1);
}

void
gripe_getting_mp_config (file)
     char *file;
{
  fprintf (stderr, "%s: unable to find the file %s\n", prognam, file);

  fflush (stderr);

  exit (1);
}

void
gripe_reading_mp_config (file)
     char *file;
{
  fprintf (stderr, "%s: unable to make sense of the file %s\n", prognam, file);

  fflush (stderr);

  exit (1);
}

void
gripe_invalid_section (section)
     char *section;
{
  fprintf (stderr, "%s: invalid section (%s) selected\n", prognam, section);

  fflush (stderr);

  exit (1);
}

void
gripe_manpath ()
{
  fprintf (stderr, "%s: manpath is null\n", prognam);

  fflush (stderr);

  exit (1);
}

void
gripe_alloc (bytes, object)
     int bytes;
     char *object;
{
  fprintf (stderr, "%s: can't malloc %d bytes for %s\n",
	   prognam, bytes, object);

  fflush (stderr);

  exit (1);
}

void
gripe_roff_command_from_file (file)
     char *file;
{
  fprintf (stderr, "Error parsing *roff command from file %s\n", file);

  fflush (stderr);
}

void
gripe_roff_command_from_env ()
{
  fprintf (stderr, "Error parsing MANROFFSEQ.  Using system defaults.\n");

  fflush (stderr);
}

void
gripe_roff_command_from_command_line ()
{
  fprintf (stderr, "Error parsing *roff command from command line.\n");

  fflush (stderr);
}
OpenPOWER on IntegriCloud