Add additional defines for compilation.
This commit is contained in:
parent
c5f5bace63
commit
086a2ac9ab
19
util/led/error.h
Normal file
19
util/led/error.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* error.h
|
||||
*
|
||||
* Created on: 2018-11-17
|
||||
* Author: carl
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __ERROR_H_INCLUDED__
|
||||
#define __ERROR_H_INCLUDED__
|
||||
|
||||
void stop(void);
|
||||
void fatal(char *format, ...);
|
||||
void warning(char *format, ...);
|
||||
void error(char *format, ...);
|
||||
int do_verbose(char *format, ...);
|
||||
|
||||
|
||||
#endif /* __ERROR_H_INCLUDED__ */
|
23
util/led/extract.h
Normal file
23
util/led/extract.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* extract.h
|
||||
*
|
||||
* Created on: 2018-11-17
|
||||
* Author: carl
|
||||
*/
|
||||
|
||||
#ifndef __EXTRACT_H_INCLUDED__
|
||||
#define __EXTRACT_H_INCLUDED__
|
||||
|
||||
#include "out.h"
|
||||
|
||||
void extract(void);
|
||||
/*
|
||||
* Add relocation constant for names in user defined sections.
|
||||
* The value of a common name indicates a size instead of an offset,
|
||||
* and hence shouldn't be relocated.
|
||||
* Otherwise we just add the accumulated size of all normal parts in preceding
|
||||
* sections with the same size.
|
||||
*/
|
||||
void namerelocate(register struct outname *name);
|
||||
|
||||
#endif /* __EXTRACT_H_INCLUDED___ */
|
14
util/led/finish.h
Normal file
14
util/led/finish.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* finish.h
|
||||
*
|
||||
* Created on: 2018-11-17
|
||||
* Author: Carl Eric Codere
|
||||
*/
|
||||
|
||||
#ifndef __FINISH_H_INCLUDED__
|
||||
#define __FINISH_H_INCLUDED__
|
||||
|
||||
void finish(void);
|
||||
void do_crs(struct outname *base, unsigned int count);
|
||||
|
||||
#endif /* __FINISH_H_INCLUDED__ */
|
27
util/led/output.h
Normal file
27
util/led/output.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* output.h
|
||||
*
|
||||
* Created on: 2018-11-18
|
||||
* Author: carl
|
||||
*/
|
||||
|
||||
#ifndef __OUTPUT_H_INCLUDED__
|
||||
#define __OUTPUT_H_INCLUDED__
|
||||
|
||||
/*
|
||||
* We have counted all relocation structs but we know only now if
|
||||
* these must be emitted.We add all names here,unless the -s(trip)
|
||||
* flag was given.
|
||||
* If this flag is given we don't need the string table either.
|
||||
*/
|
||||
void beginoutput(void);
|
||||
|
||||
/*
|
||||
* If we didn't keep the whole output file in core, most of it has been
|
||||
* written out, and we just finish that.
|
||||
* If we did, we write out our pieces of core.
|
||||
*/
|
||||
void endoutput(void);
|
||||
|
||||
|
||||
#endif /* __OUTPUT_H_INCLUDED__ */
|
21
util/led/relocate.h
Normal file
21
util/led/relocate.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* relocate.h
|
||||
*
|
||||
* Created on: 2018-11-18
|
||||
* Author: carl
|
||||
*/
|
||||
|
||||
#ifndef __RELOCATE_H_INCLUDED__
|
||||
#define __RELOCATE_H_INCLUDED__
|
||||
|
||||
#include "out.h"
|
||||
|
||||
/*
|
||||
* This routine relocates a value in a section pointed to by `emit', of
|
||||
* which the header is pointed to by `head'. Relocation is relative to the
|
||||
* names in `names'; `relo' tells how to relocate.
|
||||
*/
|
||||
void relocate(struct outhead *head, char* emit, struct outname names[], struct outrelo *relo, long off);
|
||||
|
||||
|
||||
#endif /* __RELOCATE_H_INCLUDED__ */
|
14
util/led/save.h
Normal file
14
util/led/save.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef __SAVE_H_INCLUDED__
|
||||
#define __SAVE_H_INCLUDED__
|
||||
|
||||
#include "memory.h"
|
||||
|
||||
struct ar_hdr;
|
||||
struct outname;
|
||||
|
||||
void savemagic(void);
|
||||
void savehdr(struct ar_hdr *hdr);
|
||||
ind_t savechar(int piece, ind_t off);
|
||||
void savelocal(struct outname *name);
|
||||
|
||||
#endif /* __SAVE_H_INCLUDED__ */
|
21
util/led/write.h
Normal file
21
util/led/write.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* write.h
|
||||
*
|
||||
* Created on: 2018-11-17
|
||||
* Author: carl
|
||||
*/
|
||||
|
||||
#ifndef __WRITE_H_INCLUDED__
|
||||
#define __WRITE_H_INCLUDED__
|
||||
|
||||
#include "out.h"
|
||||
|
||||
void wr_fatal(void);
|
||||
void begin_write(void);
|
||||
void end_write(void);
|
||||
void wrt_emit(char *emit, int sectindex, long cnt);
|
||||
void wrt_nulls(int sectindex, long cnt);
|
||||
void wrt_name(struct outname *name, int writename);
|
||||
|
||||
|
||||
#endif /* __WRITE_H_INCLUDED__ */
|
Loading…
Reference in a new issue