2 # Copyright 2012 pooler@litecoinpool.org
4 # This program is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License as published by the Free
6 # Software Foundation; either version 2 of the License, or (at your option)
7 # any later version. See COPYING for more details.
9 # nomacro.pl - convert assembler macros to C preprocessor macros.
13 foreach my $f (<*.S>) {
20 if (m/^\.macro\s+([_0-9A-Z]+)(?:\s*)(.*)$/i) {
21 print FOUT "#define $1($2) \\\n";
31 for my $m (keys %macros) {
32 s/^([ \t]*)($m)(?:[ \t]+([^#\n]*))?([;\n])/\1\2(\3)\4/;
36 $_ = <FIN> while (!m/^\s*#endif/);