blob: 597fc209e0606e4824df475fc8b6200b8382b28c [file] [log] [blame]
Jari Aalto726f6381996-08-26 18:22:31 +00001/* error.c -- Functions for handling errors. */
Jari Aalto31859422009-01-12 13:36:28 +00002
3/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
Jari Aalto726f6381996-08-26 18:22:31 +00004
5 This file is part of GNU Bash, the Bourne Again SHell.
6
Jari Aalto31859422009-01-12 13:36:28 +00007 Bash is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
Jari Aalto726f6381996-08-26 18:22:31 +000011
Jari Aalto31859422009-01-12 13:36:28 +000012 Bash is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
Jari Aalto726f6381996-08-26 18:22:31 +000016
Jari Aalto31859422009-01-12 13:36:28 +000017 You should have received a copy of the GNU General Public License
18 along with Bash. If not, see <http://www.gnu.org/licenses/>.
19*/
Jari Aalto726f6381996-08-26 18:22:31 +000020
Jari Aaltoccc6cda1996-12-23 17:02:34 +000021#include "config.h"
22
Jari Aaltod166f041997-06-05 14:59:13 +000023#include "bashtypes.h"
Jari Aalto726f6381996-08-26 18:22:31 +000024#include <fcntl.h>
25
Jari Aaltoccc6cda1996-12-23 17:02:34 +000026#if defined (HAVE_UNISTD_H)
27# include <unistd.h>
28#endif
29
30#if defined (PREFER_STDARG)
31# include <stdarg.h>
32#else
Jari Aalto7117c2d2002-07-17 14:10:11 +000033# include <varargs.h>
Jari Aalto726f6381996-08-26 18:22:31 +000034#endif
35
Jari Aaltod166f041997-06-05 14:59:13 +000036#include <stdio.h>
37
Jari Aalto726f6381996-08-26 18:22:31 +000038#include <errno.h>
39#if !defined (errno)
Ricardo Cerqueiraa02fbff2013-07-25 22:35:34 +010040#include <errno.h>
Jari Aalto726f6381996-08-26 18:22:31 +000041#endif /* !errno */
42
43#include "bashansi.h"
Jari Aaltob80f6442004-07-27 13:29:18 +000044#include "bashintl.h"
45
46#include "shell.h"
Jari Aalto726f6381996-08-26 18:22:31 +000047#include "flags.h"
Jari Aaltoccc6cda1996-12-23 17:02:34 +000048#include "input.h"
Jari Aalto726f6381996-08-26 18:22:31 +000049
Jari Aaltoccc6cda1996-12-23 17:02:34 +000050#if defined (HISTORY)
51# include "bashhist.h"
52#endif
53
Jari Aalto7117c2d2002-07-17 14:10:11 +000054extern int executing_line_number __P((void));
55
Chet Ramey00018032011-11-21 20:51:19 -050056extern int last_command_exit_value;
Jari Aalto726f6381996-08-26 18:22:31 +000057extern char *shell_name;
Jari Aalto726f6381996-08-26 18:22:31 +000058#if defined (JOB_CONTROL)
59extern pid_t shell_pgrp;
Jari Aaltof73dda02001-11-13 17:56:06 +000060extern int give_terminal_to __P((pid_t, int));
Jari Aalto726f6381996-08-26 18:22:31 +000061#endif /* JOB_CONTROL */
62
Jari Aaltob80f6442004-07-27 13:29:18 +000063#if defined (ARRAY_VARS)
Jari Aalto31859422009-01-12 13:36:28 +000064extern const char * const bash_badsub_errmsg;
Jari Aaltob80f6442004-07-27 13:29:18 +000065#endif
66
Jari Aalto7117c2d2002-07-17 14:10:11 +000067static void error_prolog __P((int));
68
Jari Aaltoccc6cda1996-12-23 17:02:34 +000069/* The current maintainer of the shell. You change this in the
70 Makefile. */
71#if !defined (MAINTAINER)
Jari Aaltobb706242000-03-17 21:46:59 +000072#define MAINTAINER "bash-maintainers@gnu.org"
Jari Aaltoccc6cda1996-12-23 17:02:34 +000073#endif
74
Jari Aalto31859422009-01-12 13:36:28 +000075const char * const the_current_maintainer = MAINTAINER;
Jari Aaltoccc6cda1996-12-23 17:02:34 +000076
Jari Aaltob80f6442004-07-27 13:29:18 +000077int gnu_error_format = 0;
78
Jari Aalto7117c2d2002-07-17 14:10:11 +000079static void
80error_prolog (print_lineno)
81 int print_lineno;
82{
Jari Aaltob80f6442004-07-27 13:29:18 +000083 char *ename;
Jari Aalto7117c2d2002-07-17 14:10:11 +000084 int line;
85
Jari Aaltob80f6442004-07-27 13:29:18 +000086 ename = get_name_for_error ();
87 line = (print_lineno && interactive_shell == 0) ? executing_line_number () : -1;
Jari Aalto7117c2d2002-07-17 14:10:11 +000088
Jari Aaltob80f6442004-07-27 13:29:18 +000089 if (line > 0)
Jari Aalto31859422009-01-12 13:36:28 +000090 fprintf (stderr, "%s:%s%d: ", ename, gnu_error_format ? "" : _(" line "), line);
Jari Aaltob80f6442004-07-27 13:29:18 +000091 else
92 fprintf (stderr, "%s: ", ename);
Jari Aalto7117c2d2002-07-17 14:10:11 +000093}
94
Jari Aalto726f6381996-08-26 18:22:31 +000095/* Return the name of the shell or the shell script for error reporting. */
96char *
97get_name_for_error ()
98{
Jari Aaltoccc6cda1996-12-23 17:02:34 +000099 char *name;
Jari Aaltob80f6442004-07-27 13:29:18 +0000100#if defined (ARRAY_VARS)
101 SHELL_VAR *bash_source_v;
102 ARRAY *bash_source_a;
103#endif
Jari Aalto726f6381996-08-26 18:22:31 +0000104
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000105 name = (char *)NULL;
106 if (interactive_shell == 0)
Jari Aaltob80f6442004-07-27 13:29:18 +0000107 {
108#if defined (ARRAY_VARS)
109 bash_source_v = find_variable ("BASH_SOURCE");
110 if (bash_source_v && array_p (bash_source_v) &&
111 (bash_source_a = array_cell (bash_source_v)))
112 name = array_reference (bash_source_a, 0);
Jari Aalto31859422009-01-12 13:36:28 +0000113 if (name == 0 || *name == '\0') /* XXX - was just name == 0 */
Jari Aaltob80f6442004-07-27 13:29:18 +0000114#endif
115 name = dollar_vars[0];
116 }
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000117 if (name == 0 && shell_name && *shell_name)
Jari Aalto726f6381996-08-26 18:22:31 +0000118 name = base_pathname (shell_name);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000119 if (name == 0)
120#if defined (PROGRAM)
121 name = PROGRAM;
122#else
Jari Aalto726f6381996-08-26 18:22:31 +0000123 name = "bash";
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000124#endif
Jari Aalto726f6381996-08-26 18:22:31 +0000125
126 return (name);
127}
128
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000129/* Report an error having to do with FILENAME. This does not use
130 sys_error so the filename is not interpreted as a printf-style
131 format string. */
Jari Aalto726f6381996-08-26 18:22:31 +0000132void
133file_error (filename)
Jari Aaltof73dda02001-11-13 17:56:06 +0000134 const char *filename;
Jari Aalto726f6381996-08-26 18:22:31 +0000135{
136 report_error ("%s: %s", filename, strerror (errno));
137}
138
Jari Aalto726f6381996-08-26 18:22:31 +0000139void
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000140#if defined (PREFER_STDARG)
141programming_error (const char *format, ...)
142#else
143programming_error (format, va_alist)
144 const char *format;
Jari Aalto726f6381996-08-26 18:22:31 +0000145 va_dcl
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000146#endif
Jari Aalto726f6381996-08-26 18:22:31 +0000147{
148 va_list args;
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000149 char *h;
Jari Aalto726f6381996-08-26 18:22:31 +0000150
151#if defined (JOB_CONTROL)
Jari Aaltof73dda02001-11-13 17:56:06 +0000152 give_terminal_to (shell_pgrp, 0);
Jari Aalto726f6381996-08-26 18:22:31 +0000153#endif /* JOB_CONTROL */
154
Jari Aalto7117c2d2002-07-17 14:10:11 +0000155 SH_VA_START (args, format);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000156
Jari Aalto726f6381996-08-26 18:22:31 +0000157 vfprintf (stderr, format, args);
158 fprintf (stderr, "\n");
159 va_end (args);
160
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000161#if defined (HISTORY)
162 if (remember_on_history)
163 {
164 h = last_history_line ();
Jari Aaltob80f6442004-07-27 13:29:18 +0000165 fprintf (stderr, _("last command: %s\n"), h ? h : "(null)");
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000166 }
167#endif
168
Jari Aaltobb706242000-03-17 21:46:59 +0000169#if 0
Jari Aaltod166f041997-06-05 14:59:13 +0000170 fprintf (stderr, "Report this to %s\n", the_current_maintainer);
Jari Aaltobb706242000-03-17 21:46:59 +0000171#endif
172
Jari Aaltob80f6442004-07-27 13:29:18 +0000173 fprintf (stderr, _("Aborting..."));
Jari Aalto726f6381996-08-26 18:22:31 +0000174 fflush (stderr);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000175
Jari Aalto726f6381996-08-26 18:22:31 +0000176 abort ();
177}
178
Jari Aalto7117c2d2002-07-17 14:10:11 +0000179/* Print an error message and, if `set -e' has been executed, exit the
180 shell. Used in this file by file_error and programming_error. Used
181 outside this file mostly to report substitution and expansion errors,
182 and for bad invocation options. */
Jari Aalto726f6381996-08-26 18:22:31 +0000183void
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000184#if defined (PREFER_STDARG)
185report_error (const char *format, ...)
186#else
187report_error (format, va_alist)
188 const char *format;
Jari Aalto726f6381996-08-26 18:22:31 +0000189 va_dcl
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000190#endif
Jari Aalto726f6381996-08-26 18:22:31 +0000191{
192 va_list args;
Jari Aalto726f6381996-08-26 18:22:31 +0000193
Jari Aalto7117c2d2002-07-17 14:10:11 +0000194 error_prolog (1);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000195
Jari Aalto7117c2d2002-07-17 14:10:11 +0000196 SH_VA_START (args, format);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000197
Jari Aalto726f6381996-08-26 18:22:31 +0000198 vfprintf (stderr, format, args);
199 fprintf (stderr, "\n");
200
201 va_end (args);
202 if (exit_immediately_on_error)
Chet Ramey98043132012-03-13 15:12:07 -0400203 {
204 if (last_command_exit_value == 0)
205 last_command_exit_value = 1;
206 exit_shell (last_command_exit_value);
207 }
Jari Aalto726f6381996-08-26 18:22:31 +0000208}
209
210void
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000211#if defined (PREFER_STDARG)
212fatal_error (const char *format, ...)
213#else
214fatal_error (format, va_alist)
215 const char *format;
Jari Aalto726f6381996-08-26 18:22:31 +0000216 va_dcl
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000217#endif
Jari Aalto726f6381996-08-26 18:22:31 +0000218{
219 va_list args;
Jari Aalto726f6381996-08-26 18:22:31 +0000220
Jari Aalto7117c2d2002-07-17 14:10:11 +0000221 error_prolog (0);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000222
Jari Aalto7117c2d2002-07-17 14:10:11 +0000223 SH_VA_START (args, format);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000224
Jari Aalto726f6381996-08-26 18:22:31 +0000225 vfprintf (stderr, format, args);
226 fprintf (stderr, "\n");
227
228 va_end (args);
Jari Aalto7117c2d2002-07-17 14:10:11 +0000229 sh_exit (2);
Jari Aalto726f6381996-08-26 18:22:31 +0000230}
231
232void
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000233#if defined (PREFER_STDARG)
234internal_error (const char *format, ...)
235#else
236internal_error (format, va_alist)
237 const char *format;
Jari Aalto726f6381996-08-26 18:22:31 +0000238 va_dcl
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000239#endif
Jari Aalto726f6381996-08-26 18:22:31 +0000240{
241 va_list args;
Jari Aalto726f6381996-08-26 18:22:31 +0000242
Jari Aalto7117c2d2002-07-17 14:10:11 +0000243 error_prolog (1);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000244
Jari Aalto7117c2d2002-07-17 14:10:11 +0000245 SH_VA_START (args, format);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000246
Jari Aalto726f6381996-08-26 18:22:31 +0000247 vfprintf (stderr, format, args);
248 fprintf (stderr, "\n");
249
250 va_end (args);
251}
252
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000253void
254#if defined (PREFER_STDARG)
Jari Aaltocce855b1998-04-17 19:52:44 +0000255internal_warning (const char *format, ...)
256#else
257internal_warning (format, va_alist)
258 const char *format;
259 va_dcl
260#endif
261{
262 va_list args;
263
Jari Aalto31859422009-01-12 13:36:28 +0000264 error_prolog (1);
265 fprintf (stderr, _("warning: "));
Jari Aaltocce855b1998-04-17 19:52:44 +0000266
Jari Aalto7117c2d2002-07-17 14:10:11 +0000267 SH_VA_START (args, format);
Jari Aaltocce855b1998-04-17 19:52:44 +0000268
269 vfprintf (stderr, format, args);
270 fprintf (stderr, "\n");
271
272 va_end (args);
273}
274
275void
276#if defined (PREFER_STDARG)
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000277sys_error (const char *format, ...)
278#else
279sys_error (format, va_alist)
280 const char *format;
Jari Aalto726f6381996-08-26 18:22:31 +0000281 va_dcl
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000282#endif
Jari Aalto726f6381996-08-26 18:22:31 +0000283{
Jari Aalto7117c2d2002-07-17 14:10:11 +0000284 int e;
Jari Aalto726f6381996-08-26 18:22:31 +0000285 va_list args;
Jari Aalto726f6381996-08-26 18:22:31 +0000286
Jari Aalto7117c2d2002-07-17 14:10:11 +0000287 e = errno;
288 error_prolog (0);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000289
Jari Aalto7117c2d2002-07-17 14:10:11 +0000290 SH_VA_START (args, format);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000291
292 vfprintf (stderr, format, args);
Jari Aalto7117c2d2002-07-17 14:10:11 +0000293 fprintf (stderr, ": %s\n", strerror (e));
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000294
295 va_end (args);
296}
297
298/* An error from the parser takes the general form
299
300 shell_name: input file name: line number: message
301
302 The input file name and line number are omitted if the shell is
303 currently interactive. If the shell is not currently interactive,
304 the input file name is inserted only if it is different from the
305 shell name. */
306void
307#if defined (PREFER_STDARG)
308parser_error (int lineno, const char *format, ...)
309#else
310parser_error (lineno, format, va_alist)
311 int lineno;
312 const char *format;
313 va_dcl
314#endif
315{
316 va_list args;
317 char *ename, *iname;
318
319 ename = get_name_for_error ();
Jari Aalto7117c2d2002-07-17 14:10:11 +0000320 iname = yy_input_name ();
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000321
322 if (interactive)
323 fprintf (stderr, "%s: ", ename);
324 else if (interactive_shell)
Jari Aalto31859422009-01-12 13:36:28 +0000325 fprintf (stderr, "%s: %s:%s%d: ", ename, iname, gnu_error_format ? "" : _(" line "), lineno);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000326 else if (STREQ (ename, iname))
Jari Aalto31859422009-01-12 13:36:28 +0000327 fprintf (stderr, "%s:%s%d: ", ename, gnu_error_format ? "" : _(" line "), lineno);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000328 else
Jari Aalto31859422009-01-12 13:36:28 +0000329 fprintf (stderr, "%s: %s:%s%d: ", ename, iname, gnu_error_format ? "" : _(" line "), lineno);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000330
Jari Aalto7117c2d2002-07-17 14:10:11 +0000331 SH_VA_START (args, format);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000332
333 vfprintf (stderr, format, args);
334 fprintf (stderr, "\n");
335
336 va_end (args);
337
338 if (exit_immediately_on_error)
Chet Ramey00018032011-11-21 20:51:19 -0500339 exit_shell (last_command_exit_value = 2);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000340}
341
Jari Aalto28ef6c32001-04-06 19:14:31 +0000342#ifdef DEBUG
Chet Rameyac50fba2014-02-26 09:36:43 -0500343/* This assumes ASCII and is suitable only for debugging */
344char *
345strescape (str)
346 const char *str;
347{
348 char *r, *result;
349 unsigned char *s;
350
351 r = result = (char *)xmalloc (strlen (str) * 2 + 1);
352
353 for (s = (unsigned char *)str; s && *s; s++)
354 {
355 if (*s < ' ')
356 {
357 *r++ = '^';
358 *r++ = *s+64;
359 }
360 else if (*s == 127)
361 {
362 *r++ = '^';
363 *r++ = '?';
364 }
365 else
366 *r++ = *s;
367 }
368
369 *r = '\0';
370 return result;
371}
372
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000373void
374#if defined (PREFER_STDARG)
375itrace (const char *format, ...)
376#else
377itrace (format, va_alist)
378 const char *format;
379 va_dcl
380#endif
381{
382 va_list args;
383
Jari Aaltof73dda02001-11-13 17:56:06 +0000384 fprintf(stderr, "TRACE: pid %ld: ", (long)getpid());
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000385
Jari Aalto7117c2d2002-07-17 14:10:11 +0000386 SH_VA_START (args, format);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000387
Jari Aalto726f6381996-08-26 18:22:31 +0000388 vfprintf (stderr, format, args);
389 fprintf (stderr, "\n");
390
391 va_end (args);
392
393 fflush(stderr);
394}
395
Jari Aalto726f6381996-08-26 18:22:31 +0000396/* A trace function for silent debugging -- doesn't require a control
397 terminal. */
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000398void
399#if defined (PREFER_STDARG)
400trace (const char *format, ...)
401#else
402trace (format, va_alist)
403 const char *format;
Jari Aalto726f6381996-08-26 18:22:31 +0000404 va_dcl
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000405#endif
Jari Aalto726f6381996-08-26 18:22:31 +0000406{
407 va_list args;
Jari Aalto726f6381996-08-26 18:22:31 +0000408 static FILE *tracefp = (FILE *)NULL;
409
410 if (tracefp == NULL)
Jari Aaltobb706242000-03-17 21:46:59 +0000411 tracefp = fopen("/tmp/bash-trace.log", "a+");
Jari Aalto726f6381996-08-26 18:22:31 +0000412
413 if (tracefp == NULL)
414 tracefp = stderr;
415 else
416 fcntl (fileno (tracefp), F_SETFD, 1); /* close-on-exec */
417
Jari Aaltof73dda02001-11-13 17:56:06 +0000418 fprintf(tracefp, "TRACE: pid %ld: ", (long)getpid());
Jari Aalto726f6381996-08-26 18:22:31 +0000419
Jari Aalto7117c2d2002-07-17 14:10:11 +0000420 SH_VA_START (args, format);
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000421
Jari Aalto726f6381996-08-26 18:22:31 +0000422 vfprintf (tracefp, format, args);
423 fprintf (tracefp, "\n");
424
425 va_end (args);
426
427 fflush(tracefp);
428}
Jari Aaltoccc6cda1996-12-23 17:02:34 +0000429
Jari Aalto28ef6c32001-04-06 19:14:31 +0000430#endif /* DEBUG */
Jari Aaltob72432f1999-02-19 17:11:39 +0000431
Jari Aalto7117c2d2002-07-17 14:10:11 +0000432/* **************************************************************** */
433/* */
434/* Common error reporting */
435/* */
436/* **************************************************************** */
437
438
Jari Aalto31859422009-01-12 13:36:28 +0000439static const char * const cmd_error_table[] = {
Jari Aaltob80f6442004-07-27 13:29:18 +0000440 N_("unknown command error"), /* CMDERR_DEFAULT */
441 N_("bad command type"), /* CMDERR_BADTYPE */
442 N_("bad connector"), /* CMDERR_BADCONN */
443 N_("bad jump"), /* CMDERR_BADJUMP */
Jari Aaltob72432f1999-02-19 17:11:39 +0000444 0
445};
446
447void
448command_error (func, code, e, flags)
449 const char *func;
450 int code, e, flags; /* flags currently unused */
451{
452 if (code > CMDERR_LAST)
453 code = CMDERR_DEFAULT;
454
Jari Aaltob80f6442004-07-27 13:29:18 +0000455 programming_error ("%s: %s: %d", func, _(cmd_error_table[code]), e);
Jari Aaltob72432f1999-02-19 17:11:39 +0000456}
457
458char *
459command_errstr (code)
460 int code;
461{
462 if (code > CMDERR_LAST)
463 code = CMDERR_DEFAULT;
464
Jari Aaltob80f6442004-07-27 13:29:18 +0000465 return (_(cmd_error_table[code]));
Jari Aaltob72432f1999-02-19 17:11:39 +0000466}
Jari Aalto7117c2d2002-07-17 14:10:11 +0000467
468#ifdef ARRAY_VARS
469void
470err_badarraysub (s)
471 const char *s;
472{
Jari Aaltob80f6442004-07-27 13:29:18 +0000473 report_error ("%s: %s", s, _(bash_badsub_errmsg));
Jari Aalto7117c2d2002-07-17 14:10:11 +0000474}
475#endif
476
477void
478err_unboundvar (s)
479 const char *s;
480{
Jari Aaltob80f6442004-07-27 13:29:18 +0000481 report_error (_("%s: unbound variable"), s);
Jari Aalto7117c2d2002-07-17 14:10:11 +0000482}
483
484void
485err_readonly (s)
486 const char *s;
487{
Jari Aaltob80f6442004-07-27 13:29:18 +0000488 report_error (_("%s: readonly variable"), s);
Jari Aalto7117c2d2002-07-17 14:10:11 +0000489}