Add recursion limit info to man and help

This commit is contained in:
ISSOtm
2019-08-31 17:34:54 +02:00
parent f9a04696f2
commit 3cc67c48cf
3 changed files with 6 additions and 3 deletions

View File

@@ -288,7 +288,8 @@ static void print_usage(void)
{ {
printf( printf(
"usage: rgbasm [-EhLVvw] [-b chars] [-Dname[=value]] [-g chars] [-i path]\n" "usage: rgbasm [-EhLVvw] [-b chars] [-Dname[=value]] [-g chars] [-i path]\n"
" [-M dependfile] [-o outfile] [-p pad_value] file.asm\n"); " [-M dependfile] [-o outfile] [-p pad_value]\n"
" [-r recursion_depth] file.asm\n");
exit(1); exit(1);
} }

View File

@@ -21,6 +21,7 @@
.Op Fl M Ar dependfile .Op Fl M Ar dependfile
.Op Fl o Ar outfile .Op Fl o Ar outfile
.Op Fl p Ar pad_value .Op Fl p Ar pad_value
.Op Fl r Ar recursion_depth
.Ar file .Ar file
.Sh DESCRIPTION .Sh DESCRIPTION
The The
@@ -77,6 +78,8 @@ Write an object file to the given filename.
.It Fl p Ar pad_value .It Fl p Ar pad_value
When padding an image, pad with this value. When padding an image, pad with this value.
The default is 0x00. The default is 0x00.
.It Fl r Ar recursion_depth
Specifies the recursion depth at which RGBASM will assume being in an infinite loop.
.It Fl V .It Fl V
Print the version of the program and exit. Print the version of the program and exit.
.It Fl v .It Fl v

View File

@@ -455,8 +455,7 @@ String equates can't be exported or imported.
.Sy Important note : .Sy Important note :
An EQUS can be expanded to a string that contains another EQUS An EQUS can be expanded to a string that contains another EQUS
and it will be expanded as well. and it will be expanded as well.
This means that, if you aren't careful, you may trap the assembler into an If this creates an infinite loop, RGBASM will error out once a certain depth is reached. See the -r command-line option.
infinite loop if there's a circular dependency in the expansions.
Also, a MACRO can have inside an EQUS which references the same MACRO, which has Also, a MACRO can have inside an EQUS which references the same MACRO, which has
the same problem. the same problem.
.Pp .Pp