annotate lwlink/trunk/src/lwlink.h @ 115:776d8bea5b46

implement reading files
author lost
date Sun, 18 Jan 2009 04:53:57 +0000
parents c65fcec346cd
children 817ab0e124fa
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
112
a567dbb3f1d4 command line options
lost
parents:
diff changeset
1 /*
a567dbb3f1d4 command line options
lost
parents:
diff changeset
2 lwlink.h
a567dbb3f1d4 command line options
lost
parents:
diff changeset
3 Copyright © 2008 William Astle
a567dbb3f1d4 command line options
lost
parents:
diff changeset
4
a567dbb3f1d4 command line options
lost
parents:
diff changeset
5 This file is part of LWLINK.
a567dbb3f1d4 command line options
lost
parents:
diff changeset
6
a567dbb3f1d4 command line options
lost
parents:
diff changeset
7 LWLINK is free software: you can redistribute it and/or modify it under the
a567dbb3f1d4 command line options
lost
parents:
diff changeset
8 terms of the GNU General Public License as published by the Free Software
a567dbb3f1d4 command line options
lost
parents:
diff changeset
9 Foundation, either version 3 of the License, or (at your option) any later
a567dbb3f1d4 command line options
lost
parents:
diff changeset
10 version.
a567dbb3f1d4 command line options
lost
parents:
diff changeset
11
a567dbb3f1d4 command line options
lost
parents:
diff changeset
12 This program is distributed in the hope that it will be useful, but WITHOUT
a567dbb3f1d4 command line options
lost
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a567dbb3f1d4 command line options
lost
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
a567dbb3f1d4 command line options
lost
parents:
diff changeset
15 more details.
a567dbb3f1d4 command line options
lost
parents:
diff changeset
16
a567dbb3f1d4 command line options
lost
parents:
diff changeset
17 You should have received a copy of the GNU General Public License along with
a567dbb3f1d4 command line options
lost
parents:
diff changeset
18 this program. If not, see <http://www.gnu.org/licenses/>.
a567dbb3f1d4 command line options
lost
parents:
diff changeset
19
a567dbb3f1d4 command line options
lost
parents:
diff changeset
20 Contains the main defs used by the linker
a567dbb3f1d4 command line options
lost
parents:
diff changeset
21 */
a567dbb3f1d4 command line options
lost
parents:
diff changeset
22
a567dbb3f1d4 command line options
lost
parents:
diff changeset
23
a567dbb3f1d4 command line options
lost
parents:
diff changeset
24 #ifndef __lwlink_h_seen__
a567dbb3f1d4 command line options
lost
parents:
diff changeset
25 #define __lwlink_h_seen__
a567dbb3f1d4 command line options
lost
parents:
diff changeset
26
a567dbb3f1d4 command line options
lost
parents:
diff changeset
27 #define OUTPUT_DECB 0 // DECB multirecord format
a567dbb3f1d4 command line options
lost
parents:
diff changeset
28 #define OUTPUT_RAW 1 // raw sequence of bytes
a567dbb3f1d4 command line options
lost
parents:
diff changeset
29
115
776d8bea5b46 implement reading files
lost
parents: 114
diff changeset
30
776d8bea5b46 implement reading files
lost
parents: 114
diff changeset
31 typedef struct
776d8bea5b46 implement reading files
lost
parents: 114
diff changeset
32 {
776d8bea5b46 implement reading files
lost
parents: 114
diff changeset
33 char *filename;
776d8bea5b46 implement reading files
lost
parents: 114
diff changeset
34 unsigned char *filedata;
776d8bea5b46 implement reading files
lost
parents: 114
diff changeset
35 long filesize;
776d8bea5b46 implement reading files
lost
parents: 114
diff changeset
36 } fileinfo_t;
776d8bea5b46 implement reading files
lost
parents: 114
diff changeset
37
112
a567dbb3f1d4 command line options
lost
parents:
diff changeset
38 #ifndef __lwlink_c_seen__
a567dbb3f1d4 command line options
lost
parents:
diff changeset
39
a567dbb3f1d4 command line options
lost
parents:
diff changeset
40 extern int debug_level;
a567dbb3f1d4 command line options
lost
parents:
diff changeset
41 extern int outformat;
a567dbb3f1d4 command line options
lost
parents:
diff changeset
42 extern char *outfile;
114
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents: 112
diff changeset
43 extern int ninputfiles;
115
776d8bea5b46 implement reading files
lost
parents: 114
diff changeset
44 extern fileinfo_t **inputfiles;
112
a567dbb3f1d4 command line options
lost
parents:
diff changeset
45
114
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents: 112
diff changeset
46 #define __lwlink_E__ extern
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents: 112
diff changeset
47 #else
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents: 112
diff changeset
48 #define __lwlink_E__
112
a567dbb3f1d4 command line options
lost
parents:
diff changeset
49 #endif // __lwlink_c_seen__
a567dbb3f1d4 command line options
lost
parents:
diff changeset
50
114
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents: 112
diff changeset
51 __lwlink_E__ void add_input_file(char *fn);
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents: 112
diff changeset
52
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents: 112
diff changeset
53 #undef __lwlink_E__
112
a567dbb3f1d4 command line options
lost
parents:
diff changeset
54 #endif //__lwlink_h_seen__