recording file death
[deliverable/binutils-gdb.git] / bfd / misc.h
CommitLineData
4a81b561
DHW
1/* Copyright (C) 1990, 1991 Free Software Foundation, Inc.
2
3This file is part of BFD, the Binary File Diddler.
4
5BFD is free software; you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation; either version 1, or (at your option)
8any later version.
9
10BFD is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BFD; see the file COPYING. If not, write to
17the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
18
19/* $Id$ */
20
21/* xoxorich. coelesced from binutils.
22 *
23 * Last Mod Mon Feb 18 14:49:51 PST 1991, by rich@cygint.cygnus.com
24 */
25
26#ifndef MISC_H
27#define MISC_H 1
28
29#include "ranlib.h"
30
31#ifdef USG
32#include <string.h>
33#else
34#include <strings.h>
35#endif /* USG */
36
37#ifdef never
38#ifdef LOCKS
39#undef LOCKS
40#endif /* LOCKS */
41#endif /* never */
42
43 /* used for masking system io calls into stdio. */
44
45/* the name, ie, argv[0], of this program. */
46
47extern char *program_name;
48
49/* Current file's name */
50
51extern char *input_name;
52
53/* Current member's name, or 0 if processing a non-library file. */
54
55extern char *input_member;
56
57/* Report an error using the message for the last failed system call,
58 followed by the string NAME. */
59
60#define perror_name(name) perror(concat(program_name, ": error on ", name))
61#define pfatal_with_name(name) {perror_name(name);exit(-1);}
62
63#ifdef __STDC__
64
65extern char *concat(char *a, char *b, char *c);
66extern void *xmalloc(unsigned int size);
67extern void * xrealloc(char *ptr, int size);
68extern void error(char *string, char *arg1, char *arg2, char *arg3);
69extern void error_with_file(char *string);
70extern void fatal(char *string, char*a1, char*a2, char*a3);
71extern void print_file_name(FILE *outfile);
72extern void swap_symdef_table(struct symdef *sym, int count);
73#else
74extern char *alloca();
75extern char *concat();
76extern void * xmalloc();
77extern void *xrealloc();
78extern void error();
79extern void error_with_file();
80extern void fatal();
81extern void print_file_name();
82extern void swap_symdef_table();
83#endif /* __STDC__ */
84
85#endif /* MISC_H */
86
87/*
88 * Local Variables:
89 * comment-column: 0
90 * End:
91 */
92
93/* end of misc.h */
This page took 0.059814 seconds and 4 git commands to generate.