isequal: add --skip for both left and right file
isequal: New option --skip as a shortcut for --skipleft and --skipright at once. Use that for the .list-ref files, so they now contain the first line of the output, too, which is ignored.
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
ca65 Vx.xx - Git XXXXXXXXX
|
||||||
Main file : 001-macro-simple-listing.s
|
Main file : 001-macro-simple-listing.s
|
||||||
Current file: 001-macro-simple-listing.s
|
Current file: 001-macro-simple-listing.s
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
ca65 Vx.xx - Git XXXXXXXXX
|
||||||
Main file : 002-macro-param-listing.s
|
Main file : 002-macro-param-listing.s
|
||||||
Current file: 002-macro-param-listing.s
|
Current file: 002-macro-param-listing.s
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
ca65 Vx.xx - Git XXXXXXXXX
|
||||||
Main file : 020-asciiz.s
|
Main file : 020-asciiz.s
|
||||||
Current file: 020-asciiz.s
|
Current file: 020-asciiz.s
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
ca65 Vx.xx - Git XXXXXXXXX
|
||||||
Main file : 100-byte.s
|
Main file : 100-byte.s
|
||||||
Current file: 100-byte.s
|
Current file: 100-byte.s
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
ca65 Vx.xx - Git XXXXXXXXX
|
||||||
Main file : 101-byt.s
|
Main file : 101-byt.s
|
||||||
Current file: 101-byt.s
|
Current file: 101-byt.s
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
ca65 Vx.xx - Git XXXXXXXXX
|
||||||
Main file : 102-word.s
|
Main file : 102-word.s
|
||||||
Current file: 102-word.s
|
Current file: 102-word.s
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
ca65 Vx.xx - Git XXXXXXXXX
|
||||||
Main file : 103-dbyt.s
|
Main file : 103-dbyt.s
|
||||||
Current file: 103-dbyt.s
|
Current file: 103-dbyt.s
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
ca65 Vx.xx - Git XXXXXXXXX
|
||||||
Main file : 104-dword.s
|
Main file : 104-dword.s
|
||||||
Current file: 104-dword.s
|
Current file: 104-dword.s
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
ca65 Vx.xx - Git XXXXXXXXX
|
||||||
Main file : 105-faraddr.s
|
Main file : 105-faraddr.s
|
||||||
Current file: 105-faraddr.s
|
Current file: 105-faraddr.s
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
ca65 Vx.xx - Git XXXXXXXXX
|
||||||
Main file : 106-hibytes.s
|
Main file : 106-hibytes.s
|
||||||
Current file: 106-hibytes.s
|
Current file: 106-hibytes.s
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
ca65 Vx.xx - Git XXXXXXXXX
|
||||||
Main file : 107-lobytes.s
|
Main file : 107-lobytes.s
|
||||||
Current file: 107-lobytes.s
|
Current file: 107-lobytes.s
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ ifneq ($(wildcard $1.list-ref),)
|
|||||||
# we have a reference file, compare that, too
|
# we have a reference file, compare that, too
|
||||||
|
|
||||||
# remove first line which contains a version number
|
# remove first line which contains a version number
|
||||||
$(ISEQUAL) --skipright=1 $1.list-ref $$(@:.bin=.lst)
|
$(ISEQUAL) --skip=1 $1.list-ref $$(@:.bin=.lst)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endef # LISTING_template
|
endef # LISTING_template
|
||||||
|
|||||||
@@ -36,9 +36,11 @@ int handleparameter(int argc, char *argv[])
|
|||||||
static const char opt_empty[] = "--empty";
|
static const char opt_empty[] = "--empty";
|
||||||
static const char opt_skipleft[] = "--skipleft";
|
static const char opt_skipleft[] = "--skipleft";
|
||||||
static const char opt_skipright[] = "--skipright";
|
static const char opt_skipright[] = "--skipright";
|
||||||
|
static const char opt_skip[] = "--skip";
|
||||||
|
|
||||||
static const char len_skipleft = sizeof opt_skipleft - 1;
|
static const char len_skipleft = sizeof opt_skipleft - 1;
|
||||||
static const char len_skipright = sizeof opt_skipright - 1;
|
static const char len_skipright = sizeof opt_skipright - 1;
|
||||||
|
static const char len_skip = sizeof opt_skip - 1;
|
||||||
|
|
||||||
int argindex = 1;
|
int argindex = 1;
|
||||||
|
|
||||||
@@ -81,6 +83,16 @@ int handleparameter(int argc, char *argv[])
|
|||||||
fprintf(stderr, "%s: you must specify the number of lines\n", opt_skipright);
|
fprintf(stderr, "%s: you must specify the number of lines\n", opt_skipright);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (strncmp(argv[argindex], opt_skip, len_skip) == 0) {
|
||||||
|
if (binary || empty) {
|
||||||
|
fprintf(stderr, "%s cannot go with other options.\n", opt_skipright);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
skiplines_left = skiplines_right = handleargparameter(len_skip, argv[argindex]);
|
||||||
|
if (skiplines_left < 0) {
|
||||||
|
fprintf(stderr, "%s: you must specify the number of lines\n", opt_skip);
|
||||||
|
}
|
||||||
|
}
|
||||||
++argindex;
|
++argindex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user