-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathoutput_test.c
More file actions
36 lines (29 loc) · 763 Bytes
/
output_test.c
File metadata and controls
36 lines (29 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* output_test.c example output driver for vasm */
/* (c) in 2002 by Volker Barthelmann */
#include "vasm.h"
static char *copyright="vasm test output module 1.0 (c) 2002 Volker Barthelmann";
static void write_output(FILE *f,section *sec,symbol *sym)
{
fprintf(f,"Sections:\n");
for(;sec;sec=sec->next)
print_section(f,sec);
fprintf(f,"Symbols:\n");
for(;sym;sym=sym->next){
print_symbol(f,sym);
fprintf(f,"\n");
}
}
static int output_args(char *p)
{
/* no args */
return 0;
}
int init_output_test(char **cp,void (**wo)(FILE *,section *,symbol *),int (**oa)(char *))
{
*cp=copyright;
*wo=write_output;
*oa=output_args;
secname_attr = 1; /* attribute is used to differentiate between sections */
asciiout=1;
return 1;
}