Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/avra.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const char *usage =
" [--define <symbol>[=<value>]]\n"
" [-I <dir>] [--listmac]\n"
" [--max_errors <number>] [--devices] [--version]\n"
" [-p] print full path of included files on pass 2\n"
" [-O e|w|i]\n"
" [-h] [--help] general help\n"
" <file to assemble>\n"
Expand All @@ -63,6 +64,7 @@ const char *usage =
" (default: 10)\n"
" --devices : List out supported devices.\n"
" --version : Version information.\n"
" --print-inc : print full path of included files on pass 2\n"
" -O e|w|i : Issue error/warning/ignore overlapping code.\n"
" --help, -h : This help text.\n";

Expand Down Expand Up @@ -108,6 +110,7 @@ main(int argc, const char *argv[])
define_arg(args, ARG_DEVICES, ARGTYPE_BOOLEAN, 0, "devices", NULL, NULL);
define_arg(args, ARG_VER, ARGTYPE_BOOLEAN, 0, "version", NULL, NULL);
define_arg(args, ARG_HELP, ARGTYPE_BOOLEAN, 'h', "help", NULL, NULL);
define_arg(args, ARG_PRINTINC, ARGTYPE_BOOLEAN, 'p', "print-inc", NULL, NULL);
define_arg(args, ARG_WRAP, ARGTYPE_BOOLEAN, 'w', "wrap", NULL, NULL); /* Not implemented ? B.A. */
define_arg(args, ARG_WARNINGS, ARGTYPE_STRING_MULTISINGLE, 'W', "warn", NULL, NULL);
define_arg(args, ARG_FILEFORMAT, ARGTYPE_CHAR_ATTACHED, 'f', "filetype", "0", NULL); /* Not implemented ? B.A. */
Expand Down Expand Up @@ -381,6 +384,7 @@ init_prog_info(struct prog_info *pi, struct args *args)

pi->max_errors = GET_ARG_I(args, ARG_MAX_ERRORS);
pi->pass=PASS_1;
pi->printinc = GET_ARG_I(args, ARG_PRINTINC);
pi->time=time(NULL);
pi->effective_overlap = GET_ARG_I(pi->args, ARG_OVERLAP);
pi->segment_overlap = SEG_DONT_OVERLAP;
Expand Down
2 changes: 2 additions & 0 deletions src/avra.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ enum {
ARG_DEVICES, /* --devices */
ARG_VER, /* --version */
ARG_HELP, /* --help, -h */
ARG_PRINTINC, /* --print-inc, -p */
ARG_WRAP, /* --wrap */
ARG_WARNINGS, /* --warn, -W */
ARG_FILEFORMAT, /* --filetype */
Expand Down Expand Up @@ -188,6 +189,7 @@ struct prog_info {
/* Warning additions */
int NoRegDef;
int pass;
int printinc;
};

struct file_info {
Expand Down
6 changes: 6 additions & 0 deletions src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ parse_file(struct prog_info *pi, const char *filename)
#if debug == 1
printf("Opening %s\n",filename);
#endif

if( (pi->pass==PASS_2) && (pi->printinc) )
{
printf("Including %s\n",filename);
}

if ((fi->fp = fopen(filename, "r"))==NULL) {
perror(filename);
free(fi);
Expand Down