| OLD | NEW |
| 1 /* BFD back-end for archive files (libraries). | 1 /* BFD back-end for archive files (libraries). |
| 2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 3 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 | 3 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, |
| 4 Free Software Foundation, Inc. | 4 2012 Free Software Foundation, Inc. |
| 5 Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault. | 5 Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault. |
| 6 | 6 |
| 7 This file is part of BFD, the Binary File Descriptor library. | 7 This file is part of BFD, the Binary File Descriptor library. |
| 8 | 8 |
| 9 This program is free software; you can redistribute it and/or modify | 9 This program is free software; you can redistribute it and/or modify |
| 10 it under the terms of the GNU General Public License as published by | 10 it under the terms of the GNU General Public License as published by |
| 11 the Free Software Foundation; either version 3 of the License, or | 11 the Free Software Foundation; either version 3 of the License, or |
| 12 (at your option) any later version. | 12 (at your option) any later version. |
| 13 | 13 |
| 14 This program is distributed in the hope that it will be useful, | 14 This program is distributed in the hope that it will be useful, |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 #ifndef errno | 140 #ifndef errno |
| 141 extern int errno; | 141 extern int errno; |
| 142 #endif | 142 #endif |
| 143 | 143 |
| 144 /* We keep a cache of archive filepointers to archive elements to | 144 /* We keep a cache of archive filepointers to archive elements to |
| 145 speed up searching the archive by filepos. We only add an entry to | 145 speed up searching the archive by filepos. We only add an entry to |
| 146 the cache when we actually read one. We also don't sort the cache; | 146 the cache when we actually read one. We also don't sort the cache; |
| 147 it's generally short enough to search linearly. | 147 it's generally short enough to search linearly. |
| 148 Note that the pointers here point to the front of the ar_hdr, not | 148 Note that the pointers here point to the front of the ar_hdr, not |
| 149 to the front of the contents! */ | 149 to the front of the contents! */ |
| 150 struct ar_cache { | 150 struct ar_cache |
| 151 { |
| 151 file_ptr ptr; | 152 file_ptr ptr; |
| 152 bfd *arbfd; | 153 bfd *arbfd; |
| 153 }; | 154 }; |
| 154 | 155 |
| 155 #define ar_padchar(abfd) ((abfd)->xvec->ar_pad_char) | 156 #define ar_padchar(abfd) ((abfd)->xvec->ar_pad_char) |
| 156 #define ar_maxnamelen(abfd) ((abfd)->xvec->ar_max_namelen) | 157 #define ar_maxnamelen(abfd) ((abfd)->xvec->ar_max_namelen) |
| 157 | 158 |
| 158 #define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data)) | 159 #define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data)) |
| 159 #define arch_hdr(bfd) ((struct ar_hdr *) arch_eltdata (bfd)->arch_header) | 160 #define arch_hdr(bfd) ((struct ar_hdr *) arch_eltdata (bfd)->arch_header) |
| 160 | 161 |
| 161 /* True iff NAME designated a BSD 4.4 extended name. */ | 162 /* True iff NAME designated a BSD 4.4 extended name. */ |
| 162 | 163 |
| 163 #define is_bsd44_extended_name(NAME) \ | 164 #define is_bsd44_extended_name(NAME) \ |
| 164 (NAME[0] == '#' && NAME[1] == '1' && NAME[2] == '/' && ISDIGIT (NAME[3])) | 165 (NAME[0] == '#' && NAME[1] == '1' && NAME[2] == '/' && ISDIGIT (NAME[3])) |
| 165 | 166 |
| 166 | 167 |
| 167 void | 168 void |
error: old chunk mismatch |
None
| OLD | NEW |