Lint
[deliverable/binutils-gdb.git] / bfd / misc.h
1 /* Copyright (C) 1990, 1991 Free Software Foundation, Inc.
2
3 This file is part of BFD, the Binary File Diddler.
4
5 BFD is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 1, or (at your option)
8 any later version.
9
10 BFD is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with BFD; see the file COPYING. If not, write to
17 the 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
47 extern char *program_name;
48
49 /* Current file's name */
50
51 extern char *input_name;
52
53 /* Current member's name, or 0 if processing a non-library file. */
54
55 extern 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
65 extern char *concat(char *a, char *b, char *c);
66 extern void *xmalloc(unsigned int size);
67 extern void * xrealloc(char *ptr, int size);
68 extern void error(char *string, char *arg1, char *arg2, char *arg3);
69 extern void error_with_file(char *string);
70 extern void fatal(char *string, char*a1, char*a2, char*a3);
71 extern void print_file_name(FILE *outfile);
72 extern void swap_symdef_table(struct symdef *sym, int count);
73 #else
74 extern char *alloca();
75 extern char *concat();
76 extern void * xmalloc();
77 extern void *xrealloc();
78 extern void error();
79 extern void error_with_file();
80 extern void fatal();
81 extern void print_file_name();
82 extern 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.031675 seconds and 4 git commands to generate.