mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-18 16:25:05 +08:00
syncfiles: handle the case of the null path separator
Correctly handle the null path separator (meaning remove the directory portion entirely.)
This commit is contained in:
parent
6f4252afea
commit
19b741835f
@ -33,11 +33,11 @@ O = o
|
||||
NASM = nasm.o nasmlib.o raa.o saa.o \
|
||||
float.o insnsa.o insnsb.o \
|
||||
assemble.o labels.o hashtbl.o crc64.o parser.o \
|
||||
outform.o output/outbin.o \
|
||||
output/outaout.o output/outcoff.o \
|
||||
output/outelf32.o output/outelf64.o \
|
||||
output/outobj.o output/outas86.o output/outrdf2.o \
|
||||
output/outdbg.o output/outieee.o output/outmacho.o \
|
||||
outform.o outbin.o \
|
||||
outaout.o outcoff.o \
|
||||
outelf32.o outelf64.o \
|
||||
outobj.o outas86.o outrdf2.o \
|
||||
outdbg.o outieee.o outmacho.o \
|
||||
preproc.o quote.o pptok.o macros.o \
|
||||
listing.o eval.o exprlib.o stdscan.o strfunc.o \
|
||||
tokhash.o regvals.o regflags.o
|
||||
|
12
syncfiles.pl
12
syncfiles.pl
@ -11,11 +11,19 @@
|
||||
|
||||
sub do_transform($$) {
|
||||
my($l, $h) = @_;
|
||||
my($ps) = $$h{'path-separator'};
|
||||
|
||||
$l =~ s/\x01/$$h{'object-ending'}/g;
|
||||
$l =~ s/\x02/$$h{'path-separator'}/g;
|
||||
$l =~ s/\x03/$$h{'continuation'}/g;
|
||||
|
||||
if ($ps eq '') {
|
||||
# Remove the path separator and the preceeding directory
|
||||
$l =~ s/\S*\x02//g;
|
||||
} else {
|
||||
# Convert the path separator
|
||||
$l =~ s/\x02/$ps/g;
|
||||
}
|
||||
|
||||
return $l;
|
||||
}
|
||||
|
||||
@ -31,7 +39,7 @@ foreach $file (@ARGV) {
|
||||
# First, read the syntax hints
|
||||
%hints = %def_hints;
|
||||
while (defined($line = <FILE>)) {
|
||||
if ($line =~ /^\#\s+\@(\S+)\:\s*\"([^\"]+)\"/) {
|
||||
if ($line =~ /^\#\s+\@(\S+)\:\s*\"([^\"]*)\"/) {
|
||||
$hints{$1} = $2;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user